Displaying Results on a Form

R

RussCRM

I have a query that returns the number of guests who have ordered a
breakfast, lunch or dinner based on a combo box on form
"MealCounts". Instead of displaying the query however, I would like
the count to show up in another textbox on my form when the selection
in the combo box is changed. For instance, if three people have
ordered breakfast, and the user clicks on the combo box and selects
"Breakfast", I want the count, 3 in this case, to show up in another
text box on the form.

How can I do this?
 
K

Klatuu

Use the DCount function as the control source of the text box. The field and
table names are made up for example, you will have to change it for you names.

=DCount("*",MealTable,"MeatType = 'Breakfast'")
 
Top