By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,609 Members | 1,164 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,609 IT Pros & Developers. It's quick & easy.

count in combobox

P: n/a
Dears,

Can you tell me how to apply count function on a combo box in a query?
for example i have table with a drop down field named Programs and it
consists (under graduate, graduate, post graduate) i want to count the
under graduate records based on the above mentioned combo box.

Can I do it so?

Naweed

Jun 10 '07 #1
Share this Question
Share on Google+
1 Reply

P: n/a
Dear Your Highness:

Assuming your combobox is on a form named Prince, the name of your combobox
is TheRoyalCombobox, the rowsource of your combobox is a value list of under
graduate, graduate and post graduate and the name of your table is
TheRoyalTable, use:

CountOfRecords = DCount("*","TheRoyalTable","[Programs] = '" &
Forms!Prince!TheRoyalCombobox & "'")

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
re******@pcdatasheet.com



<ki*********@gmail.comwrote in message
news:11*********************@q66g2000hsg.googlegro ups.com...
Dears,

Can you tell me how to apply count function on a combo box in a query?
for example i have table with a drop down field named Programs and it
consists (under graduate, graduate, post graduate) i want to count the
under graduate records based on the above mentioned combo box.

Can I do it so?

Naweed

Jun 10 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.