Understanding a combo box filling another table's field

G

Guest

I created a combo box on a ZIP Code table within a
Contact Information form. I used the wizard to set it up
so that when I select a ZIP Code from the combo box
(which displays ZIP Code, City, State from the ZIP Code
table), the combo box stores the ZIP code in the Contact
Information field.

I've looked for code to see how this happens, but can
find none nor is there anything in the Property box that
would make this happen.

Can anyone explain the mechanism here?

Thanks.
 
J

Jeff Boyce

Are you saying you used a "lookup" data type in your table? This may cause
you headaches later on, especially if your ZIPCode table uses a primary key,
and your Contact table is storing the key, but displaying the ZIPCode.

Rather than working directly in the table, consider using a form to display
information. Build a combo box on the form that uses the ZIPCode table as a
row source, and is bound to the Contact table ZIPCode field. You would need
to change the "lookup" datatype to an appropriate different type.
 
G

Guest

Hi Jeff,

Thanks for your reply. Your suggestion is a good one.
For the moment, though, I'm just trying to understand the
mechanism of how a combo box stores field data from one
table in the forms active table.

George
 
G

Guest

BTW, Jeff, I didn't use a Lookup data type. The form is
Contact Information (using the Contact Information table)
and the combo box on the form uses the ZIP Codes table.
G.
 
J

Jeff Boyce

I'm confused. You posted in a tablesdbdesign newsgroup. You mentioned
creating a combo box in a table. You mentioned using the wizard. These
suggest that you've selected the "lookup" data type for this field, and told
Access to use a combo box based on your ZIPCode table.

What form? You hadn't mentioned a form before.

Jeff Boyce
<Access MVP>
 
G

Guest

Ahhh. The bound column in the Property box handles the
storage, right? And (at least in Access 2002) there's no
way to bind more than one column in a table. That's why
we add an Event Procedure, no? Which is a whole other
question!
 

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