How do I setup a combo box in form to populate other text boxes

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

Guest

Hi,

I am trying to setup a data entry form for my users so they do not have to
type in an address. I would like to make it so they select the name of a
branch and the complete address of that branch populate to the other text
boxes once selected can someone please help me? Also can I also do this with
another item on the same form?
 
Use the After Update event of the combo box and the DLookup Function to
accomplish this.

The names are made up, substitute the real names.
If the field that identifies your branch is numberic, use this form:

Me.txtBranchAddress = DLookup("[BranchAddress]", "BranchTable", _
"[BranchID] = " & Me.cboBranch)

If it is text, use this form:

Me.txtBranchAddress = DLookup("[BranchAddress]", "BranchTable", _
"[BranchID] = '" & Me.cboBranch & "'")
 
Back
Top