Count in VBA

SiGill

Registered User.
Local time
Today, 08:05
Joined
Dec 22, 2008
Messages
72
I have a button on a form. What I want to tell the button to do is count the number of entries in a table, if that count is equal to a certain number then run a macro, if the count is not equal then run a different macro.

How do I use the count function in VBA?
 
Code:
Answer = DCount("*","Table")
If Answer > X Then
    Do This
Else
    Do That
End If
 
Perfect DCOUNT function does the trick

Thanks
 

Users who are viewing this thread

Back
Top Bottom