Bearing in mind I probably shouldn't be playing with code in general if I have to ask this ^_^ But can anyone tell me how to add this code to a bottons "On Click" event ?
The code is stored as a module and I cannot see an option to add a module to do this :/ The codes from this Forum and written by Hayley and looks ideal for the job I want it for
Anyother suggestions on how to do this another way would be great also
Many Thanks
The code is stored as a module and I cannot see an option to add a module to do this :/ The codes from this Forum and written by Hayley and looks ideal for the job I want it for
Code:
Private Sub CmdOpenResFrm_Click()
Dim strPasswd
strPasswd = InputBox("Enter Password", "Restricted Form")
If strPasswd = "blueoxford" Then
DoCmd.OpenForm "FrmName", acNormal
Else
MsgBox "Password Incorrect"
Exit Sub
End If
End Sub
Anyother suggestions on how to do this another way would be great also
Many Thanks