Default Value in Combo Box (1 Viewer)

wrek

Registered User.
Local time
Today, 23:58
Joined
Jun 14, 2001
Messages
88
Hi all,

I have a table Preparer List, with two columns - User (primary key) and Computer.

(eg. [John Smith, 3P15], [Jane Doe, 3Q14])

I've got a login form on which there is a combobox showing all the preparer names. LimitToList = No, because I want any user to access it.

I've also got a function that determines the computer name (automatically). How do I set the default value in the combo box to 'John Smith', if my function returns '3P15'?

(this would save the user a lot of hassle putting in the info for login purposes...I don't want to make it restrictive, they should be able to change it...for instance if their logging in from someone elses computer)

tx. Bye all.
 

Abby N

Registered User.
Local time
Today, 23:58
Joined
Aug 22, 2000
Messages
123
If I'm understanding your question correctly then you can use a DLookup in the combobox's default value. Something like:

=DLookup("[User]", "[Preparer List]", "[Computer] = '" & CurrentComputer &"'")

where CurrentComputer is your function that returns the computer name. Good Luck.

~Abby
 

wrek

Registered User.
Local time
Today, 23:58
Joined
Jun 14, 2001
Messages
88
Dear abby (yeah I know, I'm awful),

you read the question right. Dlookup is the correct way to do it, I stumbled on it yesterday actually....

...just responding to let you know that you were right.

Thanx anyway,

wrek.
 

Users who are viewing this thread

Top Bottom