B
Billy Norris via AccessMonster.com
I have a password routine that works. I have a table of Userid, UserName,
User password.
The password if successful will open an edit form. How can I get the edit
form to populate with the User id from the password routine. Below is my
password code:
Private Sub Submit_Click()
'Simple password routine.
Dim F As Form
Set F = Forms![frmPswrdEdit]
If F!pwd = "awesome" Then GoTo pwd_success
If F!pwd <> "awesome" Then GoTo pwd_invalid
If IsNull(F!pwd) Then GoTo pwd_invalid
If Len(F!pwd) = 0 Then GoTo pwd_invalid
On Error GoTo pwd_trap
pwd_success:
DoCmd.Close acForm, "frmpswrdEdit"
acMenuVer70
DoCmd.OpenForm "frmEdit"
' The following Me!fields are located on the "frmEdit"
Me!DateUpdated = Date
Me!TimeUpdated = Time()
Me!Admin = tbl.Users "Name" 'get User name from User table
Exit Sub
User password.
The password if successful will open an edit form. How can I get the edit
form to populate with the User id from the password routine. Below is my
password code:
Private Sub Submit_Click()
'Simple password routine.
Dim F As Form
Set F = Forms![frmPswrdEdit]
If F!pwd = "awesome" Then GoTo pwd_success
If F!pwd <> "awesome" Then GoTo pwd_invalid
If IsNull(F!pwd) Then GoTo pwd_invalid
If Len(F!pwd) = 0 Then GoTo pwd_invalid
On Error GoTo pwd_trap
pwd_success:
DoCmd.Close acForm, "frmpswrdEdit"
acMenuVer70
DoCmd.OpenForm "frmEdit"
' The following Me!fields are located on the "frmEdit"
Me!DateUpdated = Date
Me!TimeUpdated = Time()
Me!Admin = tbl.Users "Name" 'get User name from User table
Exit Sub