A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Understanding a combo box filling another table's field



 
 
Thread Tools Display Modes
  #1  
Old June 22nd, 2004, 01:02 PM
external usenet poster
 
Posts: n/a
Default Understanding a combo box filling another table's field

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.
  #2  
Old June 22nd, 2004, 01:21 PM
Jeff Boyce
external usenet poster
 
Posts: n/a
Default Understanding a combo box filling another table's field

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.

--
Good luck

Jeff Boyce
Access MVP

  #3  
Old June 22nd, 2004, 01:30 PM
external usenet poster
 
Posts: n/a
Default Understanding a combo box filling another table's field

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

-----Original Message-----
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.

--
Good luck

Jeff Boyce
Access MVP

.

  #4  
Old June 22nd, 2004, 01:33 PM
external usenet poster
 
Posts: n/a
Default Understanding a combo box filling another table's field

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.

-----Original Message-----
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.

--
Good luck

Jeff Boyce
Access MVP

.

  #5  
Old June 22nd, 2004, 01:48 PM
Jeff Boyce
external usenet poster
 
Posts: n/a
Default Understanding a combo box filling another table's field

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

wrote in message
...
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.

-----Original Message-----
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.

--
Good luck

Jeff Boyce
Access MVP

.


  #6  
Old June 22nd, 2004, 01:55 PM
external usenet poster
 
Posts: n/a
Default Understanding a combo box filling another table's field

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!

-----Original Message-----
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.
.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:21 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.