By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,462 Members | 799 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,462 IT Pros & Developers. It's quick & easy.

Checking the value of a field in a table from Code

P: n/a
Hi. I know there is a simple answer to this one but for the life of me I
can't get it.

I have a login form where users type their username and password. When
they press the login button, I have a rout ine to validate the input
which checks a table using DLookup. The table consists of three fields:
UserName,Password and Administrator.

Administrator is a yes/No field.

I can add users and make them an administrator by using my Add User form
which has an option group to select whether the user is an administrator
or not. This all works fine. I can add users and select their
administrator and it gets written correctly to the table.

The problem I am having is extracting the value of the Administrator
field in the tblLogin table and passing it to the main table so that I
can enable/disable certain options.

Hope this is clearer to most people than it is to me.

Thanks for any help


*** Sent via Developersdex ***
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies

P: n/a
You could do another dlookup like:
blnAdministrator=dlookup("Administrator","tblLogin ","UserName='" &
txtUserName & "'")

blnAdministrator could be a global variables if you need to use it in
multiple places.

I hope I understood your question correctly. Good luck.

Julie Vazquez.

Nov 13 '05 #2

P: n/a

Thanks Julie.

It works Perfectly.!!!

*** Sent via Developersdex ***
Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.