J
J
I have a macro that is supposed to run VBA code that contains a
function. This function contains code that decides which of 2 queries
to run depending on if a check box is checked or not. In my macro i
have the "RunCode" option selected and "chkMisc()" selected as the
Function name. I get an error when I click my update button that says
"The expression you entered has a function name that STATUS can't find"
Here's the function that I'm using:
Public Function chkMisc()
If Me.chk1.value = True Then
DoCmd.OpenQuery "Status wk 01 Jobs Not in Job Card Table"
End If
If Me.chk1.value = False Then
DoCmd.OpenQuery "Status wk 01 Serial Numbers not in Job Card Table"
End If
End Function
Let me know if I left out any piece of information that might be needed
to solve this problem. Any help is appreciated.
function. This function contains code that decides which of 2 queries
to run depending on if a check box is checked or not. In my macro i
have the "RunCode" option selected and "chkMisc()" selected as the
Function name. I get an error when I click my update button that says
"The expression you entered has a function name that STATUS can't find"
Here's the function that I'm using:
Public Function chkMisc()
If Me.chk1.value = True Then
DoCmd.OpenQuery "Status wk 01 Jobs Not in Job Card Table"
End If
If Me.chk1.value = False Then
DoCmd.OpenQuery "Status wk 01 Serial Numbers not in Job Card Table"
End If
End Function
Let me know if I left out any piece of information that might be needed
to solve this problem. Any help is appreciated.