Kamis, 29 November 2012

Re: [MS_AccessPros] count

 

Youssef-

Build a query using either Graham's or Duane's expression on every one of
your text fields in the table. Build a Totals query on that to Sum the
counts.

For example, if the field is named "Comments", put this on the Fields line:

CommentSCount: (Len([Comments])-Len(Replace([Comments], "S", ""))

John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)

-----Original Message-----
From: Youssef <youssef2309@gmail.com>
Reply-To: <MS_Access_Professionals@yahoogroups.com>
Date: Thursday, November 29, 2012 10:48 AM
To: <MS_Access_Professionals@yahoogroups.com>
Subject: Re: [MS_AccessPros] count

i need to count the number of a certain character (for example "S") in all
table fields and records.

--- In MS_Access_Professionals@yahoogroups.com, John Viescas <JohnV@...>
wrote:
>
> OK, I give up! 😃
>
> John
>
> -----Original Message-----
> From: Graham Mandeno <graham@...>
> Reply-To: <MS_Access_Professionals@yahoogroups.com>
> Date: Thursday, November 29, 2012 10:03 AM
> To: <MS_Access_Professionals@yahoogroups.com>
> Subject: RE: [MS_AccessPros] count
>
> Hi John
>
>
>
> How about this?
>
> (Len([YourExpression])-Len(Replace([YourExpression], [SearchString],""))
>/
> Len([SearchString])
>
>
>
> -- Graham
>
>
>
> From: MS_Access_Professionals@yahoogroups.com
> [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of John
>Viescas
> Sent: Thursday, 29 November 2012 21:50
> To: MS_Access_Professionals@yahoogroups.com
> Subject: Re: [MS_AccessPros] count
>
>
>
>
>
> Note, however, that this technique works for "counting" a single
>character
> only. My code lets you search for strings of letters.
>
> John
>
> -----Original Message-----
> From: John Viescas <JohnV@... <mailto:JohnV%40msn.com> >
> Reply-To: <MS_Access_Professionals@yahoogroups.com
> <mailto:MS_Access_Professionals%40yahoogroups.com> >
> Date: Thursday, November 29, 2012 9:20 AM
> To: <MS_Access_Professionals@yahoogroups.com
> <mailto:MS_Access_Professionals%40yahoogroups.com> >
> Subject: Re: [MS_AccessPros] count
>
> Duane-
>
> Brilliant!
>
> John Viescas, Author
> Microsoft Access 2010 Inside Out
> Microsoft Access 2007 Inside Out
> Microsoft Access 2003 Inside Out
> Building Microsoft Access Applications
> SQL Queries for Mere Mortals
> http://www.viescas.com/
> (Paris, France)
>
> -----Original Message-----
> From: Duane Hookom <duanehookom@...
> <mailto:duanehookom%40hotmail.com> >
> Reply-To: <MS_Access_Professionals@yahoogroups.com
> <mailto:MS_Access_Professionals%40yahoogroups.com> >
> Date: Thursday, November 29, 2012 3:40 AM
> To: Access Professionals Yahoo Group
> <ms_access_professionals@yahoogroups.com
> <mailto:ms_access_professionals%40yahoogroups.com> >
> Subject: RE: [MS_AccessPros] count
>
> Count the number of E's in a single field or all fields, a single record
> or multiple records?
> Len([YourExpression])-Len(Replace([YourExpression],"E",""))
>
> Duane Hookom MVP
> MS Access
>
> > To: MS_Access_Professionals@yahoogroups.com
> <mailto:MS_Access_Professionals%40yahoogroups.com>
> > From: youssef2309@... <mailto:youssef2309%40gmail.com>
> > Date: Wed, 28 Nov 2012 12:40:59 +0000
> > Subject: [MS_AccessPros] count
> >
> > how to count the number of a certain letter "for example letter E"
> >within a text in the table.
>
>
> [Non-text portions of this message have been removed]
>
> ------------------------------------
>
> Yahoo! Groups Links
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>

------------------------------------

Yahoo! Groups Links

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (10)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar