Count Fields not records with only Data (1 Viewer)

jdks2006

New member
Local time
Today, 01:26
Joined
Feb 4, 2016
Messages
7
Ok, this sounds simple, but it's not to me.

I have a conference registration database and I need to count the total number of people attending the dinner. This includes the attendee and his/her guest if they are bringing one.

I have the following:
Tbl: Attendees
Fields: Name, Dinner(Yes/No Combo box), GuestFName, GuestLName
Qry: Dinner Participants

I have the dinner participant count for the attendees. I need to count the number of GuestFName per se. If they are bringing a guest, I have entered their Guest's name.

How on Earth can I do this? I did this same thing last year in the same database that I copied over (I have changed a few things....) and it's not working for me now. I am going a bit cRaZy! Here is the formula that worked like a charm.

=Count(IIf([Attendees]![Dinner]=Yes,1,Null))+CDbl(Nz(Count([Attendees]![Guest Name]),0))
 

plog

Banishment Pending
Local time
Today, 03:26
Joined
May 11, 2011
Messages
11,645
I would add this field to your query:

Guests: Iif(IsNull(GuestFName), 1,2) AS Guests

Then in the report you simply SUM the Guests field.
 

jdks2006

New member
Local time
Today, 01:26
Joined
Feb 4, 2016
Messages
7
You are my new Access Best Friend!! Thank you so much! I have been working on this for DAYS!!!
 

Users who are viewing this thread

Top Bottom