Thank you for the input, but it didn't work.
Column 1 in the query is the user name. Coulmn 2 is the security code.
Even when I changed the ControlSource to:
=ComboBoxName.Column(1)
it didn't work.
I changed the column count for the combo box to 2 and it now shows both
fields from the query in the drop down of the combo box, but it still
won't bring the security code to the unbound text box.
Any other ideas? Am I doing something wrong?
Thanks again.
On Jan 25, 2:31 pm, "Rick Brandt" <rickbran...@hotmail.comwrote:
chris wrote:
I'm having trouble making this work:
I have an unbound form with one unbound combo box field on it. The
combo box's row source type is a query that has a username field and a
security code field. I want to add another unbound text box to the
form and have the security code populate that field with the correct
security code based on the user from the combo box. I'm not sure if
DLookup will do it? I'm not sure how to write the dlookup function.
If someone could give me the generic code or a way to do this, I will
substitute the actual names.
Any help would be greatly appreciated!
Thank you!
ChrisJust set the ControlSource of the TextBox to...
=ComboBoxName.Column(1)
--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com- Hide quoted text -- Show quoted text -