strAdminPWord = InputBox("Password required to proceed.", "Enter Editing Password")
tblspecialaccess
specialid
username
pswd
frmname
Need a dlookup statement to get the value in the above fields! WHERE the pswd = strAdminPWord for that username
Multiple DLookup Criteria
-
- Administrator
- Posts: 78545
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Multiple DLookup Criteria
For example to retrieve specialid:
DLookup("specialid", "tblspecialaccess", "username='" & strUsername & "' AND pswd='" & strAdminPWord & "'")
strUsername is a variable containing the username you want to get the information for.
DLookup("specialid", "tblspecialaccess", "username='" & strUsername & "' AND pswd='" & strAdminPWord & "'")
strUsername is a variable containing the username you want to get the information for.
Best wishes,
Hans
Hans
-
- 4StarLounger
- Posts: 550
- Joined: 30 Jul 2014, 23:58
Re: Multiple DLookup Criteria
Thank You Hans!
-
- Administrator
- Posts: 12615
- Joined: 16 Jan 2010, 15:49
- Location: London, Europe
Re: Multiple DLookup Criteria
Creating your own code to manage passwords is ALWAYS going to lead to security holes. If this password is just to prevent mistakes then that might be fine, but if you are protecting sensitive personal or business data then please use a secure password implementation from a reliable source.
StuartR
-
- 4StarLounger
- Posts: 550
- Joined: 30 Jul 2014, 23:58
Re: Multiple DLookup Criteria
This process is just for the right to be able to edit a certain fields value. It is separate from my normal security protocol.
Thanks
Thanks