Combo box won't auto populate other fields

G

Guest

HI there.

I have a combo box on my form. When I click it, I want to have it populate
the other fields on my form.
This is an order form so when I click part abc, I want the price and
description fields to be filled in.

My parts table has an intPart key field, my orders table has this same field
as well as my suppliers part number.

I have related the two tables in a one to many relationship, enforcing
referential integrity.

What am I doing wrong here?

Thanks!

John
 
J

Jeff Boyce

Johnny

How have you "told" the combo box to do this? Are you using the AfterUpdate
event to set the values in the other controls on your form?

I assume these other controls are unbound, as it wouldn't be necessary or
advisable to be storing duplicate values...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
G

Guest

I'm not using code to do this. I've seen this before where you have a form
based on a query, the source of the combo box is the primary key and
description from the primary table and the form's underlying query has ALL
the fields from the primary table and only the relevant ones from the 2nd
table, ie quantity, date and PO number etc. When you click part abc, it
gives you all the stuff from the primary table, in the form's various text
boxes. I then type in quantity, date etc. How can I get the query to
autopopulate my other text boxes?

Thanks again,

John
--
www.brightfuture.ca/bright
My email address can be found on my site.


Jeff Boyce said:
Johnny

How have you "told" the combo box to do this? Are you using the AfterUpdate
event to set the values in the other controls on your form?

I assume these other controls are unbound, as it wouldn't be necessary or
advisable to be storing duplicate values...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
G

Guest

Johnny Bright said:
I'm not using code to do this. I've seen this before where you have a form
based on a query, the source of the combo box is the primary key and
description from the primary table and the form's underlying query has ALL
the fields from the primary table and only the relevant ones from the 2nd
table, ie quantity, date and PO number etc. When you click part abc, it
gives you all the stuff from the primary table, in the form's various text
boxes. I then type in quantity, date etc. How can I get the query to
autopopulate my other text boxes?

Thanks again,

John
--
www.brightfuture.ca/bright
My email address can be found on my site.


Jeff Boyce said:
Johnny

How have you "told" the combo box to do this? Are you using the AfterUpdate
event to set the values in the other controls on your form?

I assume these other controls are unbound, as it wouldn't be necessary or
advisable to be storing duplicate values...

Regards

Jeff Boyce
Microsoft Office/Access MVP
Hi, Johnny,

This should hopefully fix your problem...

Open the form in Design view (Design view: A window that shows the design of
these database objects: tables, queries, forms, reports, macros, and data
access pages. In Design view, you can create new database objects and modify
the design of existing ones.).

Click Control Wizards in the toolbox if it's not already pressed in.

In the toolbox, click List Box or click Combo Box .

On the form, click where you want to place the list box or combo box.

In the first wizard dialog box, click the option to find a record based on
the value you selected in the list box or combo box.

Follow the directions in the wizard dialog boxes. In the last dialog box,
click Finish to display the list box or combo box in Design view.

.... It's really all done by the wizard, you just need to select that first
option to find a record based on the value you selected in the list box or
combo box.

Good Luck,

Sonja.
 

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