DCount or RecordCount?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi there! It's a beautiful day in Cincinnati, Ohio! Using A02 on XP.

I have a form called "ASCiiInfoMain" and a button grouping on it will open
one of 4 ReadOnly queries. I would like to have an unbound control beside
each that will display the number of records currently in each when the form
opens to the requested contract number. One query is called "qSL1ICSYes",
another is "qSL1ICSNo".

I've seen info about DCount and RecordCount. Not sure which to use to
reference a query. I know how to reference fields on forms. Haven't done
this before so want to learn the right way first. Creating an expression
only showed <Value> to select.

Thanks in advance for your time and (I hope) your help.
 
hi Bonnie,
One query is called "qSL1ICSYes",
another is "qSL1ICSNo".
Place a TextBox next to your button
and use '=DCount("ID", "qSL1ICSYes")' as ControlSource.

Replace ID by an existing field in your query.

mfG
--> stefan <--
 
Create a text box in the form, in the control source of this text box you can
write

=DCount ("*","qSL1ICSYes")

You can create other text boxes for each query, do the same , just change
the query name
 
Back
Top