G
Guest
I have database that is public access but needs some features accessed only
by certain people.
I have created a table (called tblApprovalTable) which has the following
fields, as well as others.
Pin
PassName
SecurityLevel
I have created a form that is displayed when the protected options are
selected asking the user to enter their Passname and Pin which i then want to
check against the Approval Table.
On the 'OK' button I have the following code.
Person = Me.Text2 'Put the entered Passname into a variable
Code = Me.Text4 'Put the entered PIN code into a variable
Pincode = DLookup("[Pin]", "[TblApprovalTable]", "[PassName]" = Person)
The problem is that the variable called Pincode is being returned empty, so
the rest of the routine doesn't work.
I've not had any experience of using variables in Dlookup statements before,
so I suspect that there's something wrong with the last bit where I've used
the 'Person' variable.
I can't find any help searching anywhere else, so if anyones got any clues
then you might just save my sanity.
Thanks in advance
Neil
by certain people.
I have created a table (called tblApprovalTable) which has the following
fields, as well as others.
Pin
PassName
SecurityLevel
I have created a form that is displayed when the protected options are
selected asking the user to enter their Passname and Pin which i then want to
check against the Approval Table.
On the 'OK' button I have the following code.
Person = Me.Text2 'Put the entered Passname into a variable
Code = Me.Text4 'Put the entered PIN code into a variable
Pincode = DLookup("[Pin]", "[TblApprovalTable]", "[PassName]" = Person)
The problem is that the variable called Pincode is being returned empty, so
the rest of the routine doesn't work.
I've not had any experience of using variables in Dlookup statements before,
so I suspect that there's something wrong with the last bit where I've used
the 'Person' variable.
I can't find any help searching anywhere else, so if anyones got any clues
then you might just save my sanity.
Thanks in advance
Neil