Filtering comboboxes

hakekm

New member
Local time
Today, 07:09
Joined
Jul 1, 2013
Messages
1
Hi!

I have a subform with the following fields:

Client name, Country, Country ID

I want to add to every row a combobox with a list of towns depending on the value in the field Country ID.

My question; how do I filter the comboboxes individually based on a value in another field on the same row?

Thanks!
 
Set the rowsource for the combobox to retrieve your towns where (I presume is another combox for country) then on your town combobox, set the Event - 'On Got Focus' for an [Event procedure] set the code as follows

me.[combo Box Name].requery


This will refresh the data as soon as you click into the combobox.
You could also do the same code for the Country Combobox for the Event 'After Update'
 

Users who are viewing this thread

Back
Top Bottom