By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,479 Members | 1,179 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,479 IT Pros & Developers. It's quick & easy.

Lookup Values for ComboBox

P: n/a
Hi group,

Sorry, I had erroneously posted this question earlier in the wrong
newsgroup.

I have an Access database with two tables. The tables are OFFICES and
STATES.
Table STATES has two fields; [STATE ID] and [STATE SHORT] (two letter state
abbreviation). [STATE ID] is the primary key (data type autonumber).

Table OFFICES has fields [ADDRESS], [CITY] and [STATE ID] (data type long).

The tables are related by [STATE ID]

I want to display controls for table OFFICES on a windows form. I want the
[STATE ID] control to be a combobox that shows the state abbreviations (two
letter) from
the STATES table in the dropdown list. The actual value stored in
OFFICES.[STATE ID] would be the primary key value from the STATES table.

How can this be done?

Thanks,
Kenneth Hutson
San Antonio, TX

Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
Hi,

Take a look at the comboboxes displaymember and valuemember.

http://msdn.microsoft.com/library/de...embertopic.asp

Ken
---------------------
"Kenneth Hutson" <ke********@goetting.com> wrote in message
news:Oj**************@tk2msftngp13.phx.gbl...
Hi group,

Sorry, I had erroneously posted this question earlier in the wrong
newsgroup.

I have an Access database with two tables. The tables are OFFICES and
STATES.
Table STATES has two fields; [STATE ID] and [STATE SHORT] (two letter state
abbreviation). [STATE ID] is the primary key (data type autonumber).

Table OFFICES has fields [ADDRESS], [CITY] and [STATE ID] (data type long).

The tables are related by [STATE ID]

I want to display controls for table OFFICES on a windows form. I want the
[STATE ID] control to be a combobox that shows the state abbreviations (two
letter) from
the STATES table in the dropdown list. The actual value stored in
OFFICES.[STATE ID] would be the primary key value from the STATES table.

How can this be done?

Thanks,
Kenneth Hutson
San Antonio, TX


Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.