dCount causing Run Time Error - 3078

alktrigger

Aimless Extraordinaire
Local time
Today, 15:16
Joined
Jun 9, 2009
Messages
124
I am attempting to enable/disable a button based on the results of a query based subform. I am unsuccessful in the various attempts I have made.

Everytime I run this I get an error regarding the object that it is pointing to in this case sfrRMUDayEdit
Code:
Private Sub cmdShowData_Click()
    DoCmd.requery ""
    If DCount("*", "sfrRMUDayEdit") = 1 Then
        [Forms]![frmRMUDayEdit]![cmdAmmend].Enabled = True
    End If
End Sub
 
"sfrRMUDayEdit" needs to be the name of a table or query. It sounds like it's a form.
 

Users who are viewing this thread

Back
Top Bottom