Counting the displayed records in a sub form.

Local time
Today, 22:43
Joined
Oct 20, 1999
Messages
12
I have a form that displays the first record that matches the query. However if there is more than one record matching the query, the multiple records are displayed in a sub form of the main form.
Is there a way of counting the records in the sub form so that it can be blanked out if there is only one match ?
 
You can put this code in the appropriate place in your form and it should do what you want...

If DCount("*","QueryName") >= 2 then
Show your Subform
End if

HTH,
Jack
 
Thanks Jack, after a bit of fiddling the DCount function works fine - Cheers.
 

Users who are viewing this thread

Back
Top Bottom