When I entered docmd. In my code it worked, until I closed it then it stopped working here is my code .
Private Sub Command1_Click()
If (Txtusername = "123" And txtpassword = 123) Then
DoCmd.OpenForm FormName:="Kappa", View:=acNormal, DataMode:=acFormPropertySettings, windowMode:=acWindowNormal
DoCmd.Close
Else
MsgBox "Incorrect Login or Password"
End If
End Sub