View Full Version : I want to get the correct number of records


ion97
04-04-2001, 12:34 PM
I have a table-like form based on a Query.
I want to change certain labels on that form, based on the number of records the Query has, for example:

On the OnOpen event of the form, I want to add something like this:
If number-of-records > 10 then
Me!Label2.visible = false

I haven't had much success, using the DCount function, (perhaps I'm not using it right or it's not the correct function to use for the situation) and I don't get the correct number of records.
Could anyone give me some help on how to get the correct number of records?

Thanx in advance

casey
04-04-2001, 02:32 PM
Send the DCount function with the table name and field that your trying to count on. Maybe someone can find a syntax error in the code your using. Depending on what you're doing, the D* functions can be fickle if the syntax isn't exactly right.

ion97
04-05-2001, 05:44 AM
Somebody sujested to use:Me.RecordsetClone.RecordCount
and It works as I would like it to do.
Thanks for your time anyway.