Combo Box Issue

sseawright

New member
Local time
Yesterday, 23:44
Joined
Mar 9, 2005
Messages
7
Ok, this may have been asked before but I havn't been able to find it. It seems like a simple problem to me but can't seem to wrap my head around it. I have a table that is my control source in my form. In the table there is a town field and a municipality field. On the form I want to select the town from the combo box and have the municipality update automatically to be the correct municipality.

Any Suggestions?

Thanks.
 
yep..

simple..
you use this query as source of the combobox:
SELECT town, municipality from TableXX

you don't show the municipality in the combobox and on AfterUpdate event you write this code:

textfieldMunicipalty.Value=combobox.column(1)
' 1 because the count starts from 0

That's it..
 
but..

you need a tableXX with the association Town --> municipality
 
Thank you...I knew it was easy but I've just been looking at it for so long that I just couldn't come up with that answer.
 
"my control source in my form. In the table there is a town field and a municipality field. "

So how do you take the town combo box that is then updated with the municipality field to be stored in your "actual" table. I am assuming the control source is the table with the town and municipality field. BUT where is the values selected and automatically populated stored? I must obviously be missing something.
 

Users who are viewing this thread

Back
Top Bottom