Auto Fill II (for Access 2002)

B

Brendan

My questions is similar to the earlier question titled Auto Fill. I am
creating a form and would like to know if it is possible to have the text
boxes on the form auto fill. What I would like to be able to do is choose a
customers name from a combo box and have the information that is tied to that
name in several different tables populate text boxes within the same form.
The combo box is pulling information from a table titled "customers" wich
would be the table that would provide most of the information for the form,
but three other tables would have information that would need to be drawn out
as well.

Please Help!

Thanks so much,

Brendan
 
A

Arvin Meyer [MVP]

If the CustomerID and Name come from a table or query that also has the
other fields, add those fields to the combo box query or select statement.
Set their column widths to zero, then add the number of columns added to the
Column Count.

Now using unbound textboxes (you do not need to save the data twice) set the
control source to the column number + 1, so:

= ComboBoxName.Column(2)

is the third column in the combo.

= ComboBoxName.Column(3)

is the fourth column, etc.
 
J

John W. Vinson

My questions is similar to the earlier question titled Auto Fill. I am
creating a form and would like to know if it is possible to have the text
boxes on the form auto fill. What I would like to be able to do is choose a
customers name from a combo box and have the information that is tied to that
name in several different tables populate text boxes within the same form.
The combo box is pulling information from a table titled "customers" wich
would be the table that would provide most of the information for the form,
but three other tables would have information that would need to be drawn out
as well.

Please Help!

Thanks so much,

Brendan

If you're trying to copy information from a customers table into some other
table... DON'T!!!

Access databases use the "Grandmother's Pantry Principle" - "A place - ONE
place! - for everything, everything in its place". The customer information
should exist *only* in the Customer table; all you need in (say) an Orders
table is the unique CustomerID.

If you just want to *show* the information on the form, without storing it,
you can put all the fields that you want to see in the combo box's Row Source
query. Display them on the form by putting textboxes on the form with control
sources like

=comboboxname.Column(n)

where n is the *zero based* index of the desired field (e.g. if the customer's
phone number is in the fifth column in the query use Column(4) ).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top