I want to get the correct number of records

ion97

Registered User.
Local time
Today, 23:41
Joined
Feb 28, 2001
Messages
27
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
 
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.
 
Somebody sujested to use:Me.RecordsetClone.RecordCount
and It works as I would like it to do.
Thanks for your time anyway.
 

Users who are viewing this thread

Back
Top Bottom