Hi,
I'm new in MS access and i have a problem with regards with the setfocus of certain form. i have a command button that will open several forms and once open i want to setfocus it in "Purchase Requisition" form. please see code below
Private Sub Login_Click()
Dim Password As Variant
Password = DLookup("Password", "Users", "UserID = '" & Me.txtUserID & "' ")
If Nz(Password, "") = Me.txtpassword Then
DoCmd.Close
DoCmd.OpenForm "Purchase Requisition"
DoCmd.OpenForm "Purchase Order"
DoCmd.OpenForm "Supplier Information"
DoCmd.OpenForm "Archive"
DoCmd.OpenForm "Others"
Else
MsgBox "Incorrect user ID or password"
End If
End Sub
hope you could help me on this one
thanks in advance
I'm new in MS access and i have a problem with regards with the setfocus of certain form. i have a command button that will open several forms and once open i want to setfocus it in "Purchase Requisition" form. please see code below
Private Sub Login_Click()
Dim Password As Variant
Password = DLookup("Password", "Users", "UserID = '" & Me.txtUserID & "' ")
If Nz(Password, "") = Me.txtpassword Then
DoCmd.Close
DoCmd.OpenForm "Purchase Requisition"
DoCmd.OpenForm "Purchase Order"
DoCmd.OpenForm "Supplier Information"
DoCmd.OpenForm "Archive"
DoCmd.OpenForm "Others"
Else
MsgBox "Incorrect user ID or password"
End If
End Sub
hope you could help me on this one
thanks in advance