MS Visual Basic Runtime Error 2494
I have encountered this error while trying to use MS Visual Basic program. The following programming codes below are the codes that I am dealing with to fully continue to access it. Please provide some guides on how to resolve this issue.
If InputBox("password") = "thepassword" then
Docmd.OpenForm formname
Else
MsgBox "You are not authorized!",vbOKOnly
End if
Private Sub Open_Activities_Menu_Click()
If InputBox("Enter password") = "111111" Then
DoCmd.OpenForm Activities_Menu
Else
MsgBox "You are not authorized!", vbOKOnly
End If
End Sub
The issue is the DoCmd line where I get a message
Run-time error '2494':
The action or method requires a Form Name argument








