How to deactivate a command button if record in a query

  • Thread starter Thread starter doyle60
  • Start date Start date
D

doyle60

I want to have a command button on a form to be activated only one
there are no records in a certain query. What is the code for this?
I used to have it but no longer have access to that database.

Thanks,

Matt
 
Thanks. I wanted it to run after the user pressed another command
button. I changed the typoed period to a comma, and retranslated it
into this:

If DCount("*", "CheckIfInputtedAlreadyqry") > 0 Then
Me.Command6.Enabled = False
Else
Me.Command6.Enabled = True
End If

I had a bit of trouble with it at first because I didn't put the query
name in quotations.

Thanks,

Matt
 
Back
Top