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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo box help

Status
Not open for further replies.

RegionsRob

Programmer
Oct 18, 2001
50
0
0
US
I've wrapped my brain inside out trying to figure this out.

Task: save a code for each county in each employee's territory.

I've got half of this figured out: using a combo box to choose the state, a second combo box that lists only the counties belonging to the state in the first combo box. The code for the county in combo2 is stored in the territory table. How do I reverse this process so that I can have a form in Datasheet View that will display the values in combo boxes 1 and 2 for the codes stored in the territory table?

The way I've done it so far is that combo1 is based on a State table, combo 2 is based on a Counties table, and the form is based on territory table. This would mean that the combo boxes would have to be Unbound for data entry, and yet somehow bound to the territory table for data display. I want data entry and display on the same form.

Example: I open the form for employee Bob Smith. It displays the state in one combo box and the county in a second combo box. There are 5 lines on the Datasheet because he works in 5 counties. Now, we expand his territory. On the same form where it already shows his counties I want to add a new record, being able to select the state in box one, select the county from the list of counties for that state, and the county code would be saved to the territory table.

(Like I said, I've wound this around so many times in my head I don't know what's going on.)

Can anyone help me get this working?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top