re count of entries (1 Viewer)

NickNeville

Registered User.
Local time
Today, 15:33
Joined
May 17, 2009
Messages
119
Good morning all
I wonder if you could help with the following please.
I have a subform where entries are made for members of a club

Part of the entry is to show whether a memebr has prepaid or not.
Like this
If Me.card_issue_Subform!ShootType Like "prepaid" Then etc etc.

Could you show me how to ask if there are more than 3 "prepaids" and if so then msgbox etc./
I guess I am looking for a Count type evaluation.

many thanks
Nick
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 07:33
Joined
Aug 30, 2003
Messages
36,133
Rather than counting what's on the form, I would typically count what's in the data directly. Something like:

If DCount("*", "TableName", "YourCriteriaHere") > 3 Then

where the criteria limited the records counted to the same records appearing on the subform (a certain member, a certain year, whatever). More info on the criteria syntax here if you need it:

http://www.mvps.org/access/general/gen0018.htm
 

NickNeville

Registered User.
Local time
Today, 15:33
Joined
May 17, 2009
Messages
119
many thanks for your quick reply Paul
I will give this a try

Rgds
Nick
 

Users who are viewing this thread

Top Bottom