Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2012

    Unanswered: auto populate from table info to form

    I am trying to build an invoice form. I want to be able to chose a client name from a dropbox and it fills out the address box with the info from the do i do this?

  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    design a form, or get the form designer to do it
    place a whatever controls you need on it
    place a combo box on the control, use the combo box wizard if you want to (mind you you may be better off using a listbox as I assume that you will not allow a user to create a new customer on this form, and a lsitbox is slightly easier for a novice to use)
    bind the control to the customer id of your invoice
    set the control source of the combo box to be the customers table.
    place some code behind the combo box on click event which looks up the customer details and stuffs that data into the relevant address columns.

    whether you do that through a recordset or stuff the address details into the combo box as hidden rows is up to you.

    if you use a recordsource then its soemthing like

    strSQL = "Select my,column,list from MyCustomerTable Where myCustomerID = " & mycombobox.value
    ...then open a recordset (look at the help file or do a google search)
    myaddresscontrol1 = MyRecordset.Addrerssline1 (or whatever you columns are called)
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts