hi.
I have a form that whe opened it opens in datasheet view
but when I open it with this code if opens in form view
could you please help me so that it opens in datasheet view from my code
thanks
steve
I have a form that whe opened it opens in datasheet view
but when I open it with this code if opens in form view
could you please help me so that it opens in datasheet view from my code
Code:
Private Sub Command375_Click()
Dim strInput As String
Dim strMsg As String
Beep
strMsg = "Please Enter the password to allow access."
strInput = InputBox(Prompt:=strMsg, Title:="Production Password")
If strInput = "Phil" Then
MsgBox "Password accepted! Welcome! " & "Phil " 'password is correct'password is correct'password is correct
DoCmd.OpenForm " What if "
DoCmd.Close acForm, Me.Name
ElseIf strInput = "" Then
Else 'password is incorrect
MsgBox "Incorrect Password!" & vbCrLf & vbLf & "You are not allowed access to the ''Inspection form''.", vbCritical, "Invalid Password"
Exit Sub
End If
End Sub
thanks
steve