Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo Box Question

Status
Not open for further replies.

VBFOXDEV35

Programmer
Mar 26, 2001
77
US
Hello again all. My question is about Combo Boxes.

I have a combo box on a form that holds all the 50 US states, when I load a record I want to have the combobox show the state from the table.

My combo box structure has 2 columns
State Description (only one visible), and the 2 character state in the second column.

How do I take the data from the database, say "CT" and search the combobox to have the state "Connecticut" display?

Thanks all for the help.

Art
Art DeGaetano II
Software Developer, MOUS
 
You might want to try using a table of states and state codes to populate the combo box and position the record pointer in the init of the form.
 
Hi

I assume the field on your table holds the codes CT,etc

Make the controlsource of the combobox this field ie tablename.statecode.

Then set the boundcolumn to column to 2

HTH

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top