Im new to VBA and Im trying to run the following module called quit from the standard switchboard:
Public Function quit()
On Error GoTo quit_Err
DoCmd.quit acSave
quit_Exit:
Exit Function
quit_Err:
MsgBox Error$
Resume quit_Exit
End Function
In the standard switchboard I am using the Command: Run Code and a Function name: quit. However, I get the error message 'There was an error executing the command'. Is there anyway of using the standard switchboard to achieve this?
Public Function quit()
On Error GoTo quit_Err
DoCmd.quit acSave
quit_Exit:
Exit Function
quit_Err:
MsgBox Error$
Resume quit_Exit
End Function
In the standard switchboard I am using the Command: Run Code and a Function name: quit. However, I get the error message 'There was an error executing the command'. Is there anyway of using the standard switchboard to achieve this?