Query to Look-up Value in place of SNo

S

sunilkeswani

Hi,


I need help on this urgently. I have synchonized combo boxes on a form,

which show the value, and when submitted, the ID of the value gets
captured. How do I create a query which will display the values
instead?


EXAMPLE


State_ID State
1. OHIO
2. NEW JERSEY
3. NEW YORK
4. GEORGIA
5. CALIFORNIA


Now on the basis of the above, if my combo box displays Ohio, New
Jersey, Ne York, Georgia, California , and when submitted, the DB gives

me- 1,2,3,4,5, with reference to the entries....how do i create a query

which throws out the actual names of the state?


Please help


Regards
 
K

Ken Snell [MVP]

I'm not fully understanding your question. Do you want the state name to
show in the combobox after you select a state? Or are you wanting to show a
state name in a query that is getting records from a table where you've
stored the numbers for State)ID?

Please, more details.
 
A

Andy - UK Access User Group

It sounds like you have coded the options as a value list into the
combo box. If you have then life will be difficult for you. You can
refer to the combo box "State" using cbobox.Column(1) but this is
unlikely to solve your problem when you have more than one record, and
the form is possibly no longer open.

I would suggest that you create a seprate table containing the state_id
and State, and use a combo box linked to this new table.

Then on a query to extract the state you just need to link in the new
table on the query grid.
 

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