Hi All
I have created the macros below and the message box appears twice while the form is loaded and also after the database is closed. I only want the message box to appear once when the form is load and once user has selected 'OK' then the message box should be disappeared and no longer required. Please could anyone help to point out my mistake:
I have created the macros below and the message box appears twice while the form is loaded and also after the database is closed. I only want the message box to appear once when the form is load and once user has selected 'OK' then the message box should be disappeared and no longer required. Please could anyone help to point out my mistake:
VBA Code:
Private Sub Form_Load()
Application.RunCommand acCmdAppMaximize
DoCmd.ShowToolbar "Ribbon", acToolbarNo
Call SetEnabledState(False)
Call Menu_Load
Me.lblWelcome.Caption = "User: " & strPeopleName
' Sets the time in the 'userUseRecord' table when the user logs into the database
Call setLogin
'Restricts access to the database to LTI staff members
Call LTIstaffPermission
'Sets users editing permissions
Call setUsersEditingPermissions
Call Msg_Box
End Sub
Private Sub Msg_Box()
MsgBox "Please note the form is no longer in use.", vbInformation, "Important Information"
End Sub