Automatic Form Completion

G

Guest

I am working on building a form. I have a combo box with several product
choices. When I make a selction in the combo box I would like the product
reference number and description to appear automatically in the two other
fields in the form. Thanks so much!

Here's what my table looks like
TABLE1:
Product Name Reference # Description
abc 00001 toy boy
..............
 
R

Rick Brandt

awach said:
I am working on building a form. I have a combo box with several product
choices. When I make a selction in the combo box I would like the product
reference number and description to appear automatically in the two other
fields in the form. Thanks so much!

Here's what my table looks like
TABLE1:
Product Name Reference # Description
abc 00001 toy boy
.............

Add those as additional columns to your ComboBox (hidden if you prefer) and then
use ControlSources for your TextBoxes of...

=ComboBoxName.Column(1)
and
=ComboBoxName.Column(2)
 
G

Guest

I do not disagree with Rick's advice.....but only comment is that when one
creates a combobox, assuming you have the Wizards turned on, then it is going
to prompt you as to whether you want the combobox selection to be used to
select a record...

if you select yes...then this is done for you.

not sure what version of Access you are using.....consider deleting your
combobox and re-adding and seeing if the wizard gives you this prompt.....
 
R

Rick Brandt

NetworkTrade said:
I do not disagree with Rick's advice.....but only comment is that when one
creates a combobox, assuming you have the Wizards turned on, then it is going
to prompt you as to whether you want the combobox selection to be used to
select a record...

if you select yes...then this is done for you.

not sure what version of Access you are using.....consider deleting your
combobox and re-adding and seeing if the wizard gives you this prompt.....

But that is for a completely different purpose. If the form is bound to a table
of parts then a ComboBox like you describe would be a tool to navigate to a
particular part record.

If the form is bound to a related table and I am using the ComboBox to enter a
part number as a foreign key value then I do not want the behavior that the
"select a record" wizard option provides.
 
G

Guest

very true
--
NTC


Rick Brandt said:
But that is for a completely different purpose. If the form is bound to a table
of parts then a ComboBox like you describe would be a tool to navigate to a
particular part record.

If the form is bound to a related table and I am using the ComboBox to enter a
part number as a foreign key value then I do not want the behavior that the
"select a record" wizard option provides.
 
G

Guest

I did that and it worked. But what if I need those fields to change when the
information is updated on the underlying tables?

For instance, have updated 'Table1' and now select 'abc' in my combo box in
the form. Now, the old values will appear without the updates to Table1.
 
G

Guest

I think your follow question kind of demonstrates the 2 different replies
between me and Rick Brandt....

Rick's reply gave the method to put those values from your combo box into
text fields......

My reply was presuming that your combo box was of a field from a table -
that the whole form was based on....

The combo box's values are coming from where??
 

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

Top