Re: Filling form based on combo box and query



On Wed, 10 Jan 2007 11:26:00 -0800, dawnecia
<dawnecia@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

I have a combo box that looks up the customer number, with the customer
number the customer name, address, phone, and other contact information will
prefill. I am using
me.customer = cboCustomerNo.column(1)
me.customerAdd = cboCustomerNo.column(2)
me.customerCity = cboCustomerNo.column(3)
etc

It is pulling the customer names but not the other fields. Any suggestions?

If you're attempting to store the customer name, address and city
redundantly in a second table, be aware that you probably DON'T want
to do so! If you just want to *see* them, you can instead set the
control source of textboxes on the form; e.g. for Customer you could
use

=cboCustomerNo.Column(1)

As for why the data isn't showing up, a couple of things to check:

- Is the combo's ColumnCount property equal to 4 (or more)?
- Does its Rowsource property consist of a query which returns all the
desired fields?
- Are you using (1) to refer to the second column of the combo, (2)
for the third etc. (since it's zero based)?

John W. Vinson[MVP]
.



Relevant Pages

  • Re: Help with data in form design
    ... > populate the related "customer' in it's own, ... spec# and the customer means that there will always be exactly one ... Widths property so that the second column, the customer, is not visible ... Then add a text box to your form and set its Control Source property to ...
    (microsoft.public.access.forms)
  • Locate Table
    ... first alpha characters of a surname and the second column ... When a new customers is entered into my database, ... call this procedure to generate a new customer number. ... How do I reference the data in this ID_table ...
    (microsoft.public.access.gettingstarted)
  • Locate Table
    ... first alpha characters of a surname and the second column ... When a new customers is entered into my database, ... call this procedure to generate a new customer number. ... How do I reference the data in this ID_table ...
    (microsoft.public.access.gettingstarted)
  • Re: Help with data in form design
    ... lookup field from a customer table... ... way to set up the lookup field in the Spec # field to display the customer ... > as the second column of the combo box. ...
    (microsoft.public.access.forms)
  • Prefill cust info from drop list into other cells
    ... I have several cells containing ... customer name, address, phone etc. that I want to prefill from the ... spreadsheet that my CustID's came from, ...
    (microsoft.public.excel.worksheet.functions)