Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 2000 - Calculation on a report

Status
Not open for further replies.

cgmarshall

Technical User
Jun 1, 2005
2
US
I need to get separate totals: (1) the number of clients who attended a seminar; and (2) the number of people from my company that attended the seminar.

Below is the code I entered into a text box on my Access report. It works until a registrant doesn't attend and a guest does.

The names listed on the report is correct, but the number of clients is not.

The Registrant Attended field is not checked, but it seems it is still counting it.

=Sum(IIf([Company]<>"My Company Name, Inc." Or [Company] Is Null And [Registrant_Attended]=True,1,0))+Sum(IIf([Guest1_Attended]=True,1,0))+Sum(IIf([Guest2_Attended]=True,1,0))
 
Are you doing this calculation on a form or report? If it's a report, you can use sorting and grouping to separate company employees from non-employees. That way, you can get totals for each group as well as the total attendees.

Also, if it is a report, you may want to repost in the Access Reports forum.

-Patrick

Nine times out of ten, the simplest solution is the best one.
 
MS Access 2000.
I have created a combo box in a form. The box contains some 20 items. All is well until some idiot user decides to type in their own item (not in the list). How can I stop users from doing this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top