D
Dave Elliott
I created a table called tblPassword and created (2) fields. (1) ObjectName
which is in text format and set to primary key
(2) KeyCode which is in text format with a input mask of PASSWORD and
default value as administrator. and is not null as condition.
Next I created a form named frmPassword and made two fields (1) named Text0
with a input mask of PASSWORD
and (2) a command button which has as it's on click event, this code
If IsNull(Forms!frmPassword!Text0.Value) Then
MsgBox "You cannot enter a blank Password. Try again."
Me!Text0.SetFocus
Else
If Forms![frmPassword]!Text0 = Me!tbl.OrdersKeyCode.Value
Then
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
I want this form, frm Password to open a form called Orders if the password
is met.
What am I doing wrong, and how can I correct it ?
Thanks,
Dave
P.S. I looked at the code on the help site, but it didnt make any sense to
me.
which is in text format and set to primary key
(2) KeyCode which is in text format with a input mask of PASSWORD and
default value as administrator. and is not null as condition.
Next I created a form named frmPassword and made two fields (1) named Text0
with a input mask of PASSWORD
and (2) a command button which has as it's on click event, this code
If IsNull(Forms!frmPassword!Text0.Value) Then
MsgBox "You cannot enter a blank Password. Try again."
Me!Text0.SetFocus
Else
If Forms![frmPassword]!Text0 = Me!tbl.OrdersKeyCode.Value
Then
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
I want this form, frm Password to open a form called Orders if the password
is met.
What am I doing wrong, and how can I correct it ?
Thanks,
Dave
P.S. I looked at the code on the help site, but it didnt make any sense to
me.