G
Guest
HELP!
I am using the following code under the ComandButton to print the current
report from my form:
Dim strWhere As String
If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If
If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[Num] = " & Me.[Num]
DoCmd.OpenReport "Check Request", acViewNormal, , strWhere
End If
However, I keep getting the following error:
The expression On Click you entered as the event property setting produced
the following error: Object or class does not support the set of events.
*The expression may not result in the name of a macro, the name of a
user-defined function, or [Event Procedure].
*There may have been an error evaluating the function, event, or macro.
The first day I used it, it worked, but for some reason unknown to me, it
stop working. I haven’t made any changes. I’ve even tried recreating the
function, but still no luck. Would really appreciate some assistance.
Thanks.
I am using the following code under the ComandButton to print the current
report from my form:
Dim strWhere As String
If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If
If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[Num] = " & Me.[Num]
DoCmd.OpenReport "Check Request", acViewNormal, , strWhere
End If
However, I keep getting the following error:
The expression On Click you entered as the event property setting produced
the following error: Object or class does not support the set of events.
*The expression may not result in the name of a macro, the name of a
user-defined function, or [Event Procedure].
*There may have been an error evaluating the function, event, or macro.
The first day I used it, it worked, but for some reason unknown to me, it
stop working. I haven’t made any changes. I’ve even tried recreating the
function, but still no luck. Would really appreciate some assistance.
Thanks.