Dear Sir/madam(s)
For security reason I have written following set of codes to open the form called editRecordF. Is it possible to use this single set of same codes to open other forms?
Private Sub cmdOK_Click()
Set db = CurrentDb
Set rs = db.OpenRecordset("UserT", DB_OPEN_DYNASET)
rs.FindFirst "password='" & CStr(textpw) & "'"
If rs.NoMatch Then
MsgBox ("Sorry, Your Password is incorrect.")
Else
DoCmd.Close acForm, "PasswordaddF", acNosave
DoCmd.OpenForm ("editRecordF")
End If
End Sub
For security reason I have written following set of codes to open the form called editRecordF. Is it possible to use this single set of same codes to open other forms?
Private Sub cmdOK_Click()
Set db = CurrentDb
Set rs = db.OpenRecordset("UserT", DB_OPEN_DYNASET)
rs.FindFirst "password='" & CStr(textpw) & "'"
If rs.NoMatch Then
MsgBox ("Sorry, Your Password is incorrect.")
Else
DoCmd.Close acForm, "PasswordaddF", acNosave
DoCmd.OpenForm ("editRecordF")
End If
End Sub