Re: Filling form based on combo box and query
- From: John Vinson <jvinson@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 10 Jan 2007 15:24:04 -0700
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]
.
- Follow-Ups:
- Prev by Date: Re: Requery "Too Soon"?
- Next by Date: Re: Write conflict error
- Previous by thread: DoCmd.GotoRecord; How to pass variables?
- Next by thread: Re: Filling form based on combo box and query
- Index(es):
Relevant Pages
|