How do I have a textbox automatically fill in with a value after .

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to have my textbox populate with a value after I select an item from a
combo box.

Example:: I select a person's last name in a combo box and have their first
name be filled in as well as their age and phone number in a text box.
 
hi,
i usually use DLookup for that.
if isnull(me.lastnamecombobox then
cancel = true
else
me.FirstNameTextbox=(DLookup"[FirstName]"), "yourtable",
"[lastname] = '" & Me.lastnamecombobox & "'")
'note: the above 2 lines wrapped and should be one line.
end if
Pup this in your combobox's before update event.
youwill need 1 DLookup for each text box you want to
populate.
good luck
 
Back
Top