I have a bound continous form with 2 comboboxes on it.
A [company] combobox and a [company_member] combobox.
If you select a company it should update the rowsource of the [company_member] box to only show the members in that company.
Both combo boxes have
BOUND COLUMN = 2 (So that I can display the names, but bind the comboboxes the ID fields)
LIMIT TO LIST = true (mandatory if using multiple fields in combobox)
Problem! I have tried 2 things here.
1)
I have tried making a rowsource for company_member which is dependant on the value of the company field.
2)
I have tried placing an event on after_update of company
which updates the rowsource of company member.
Both of these solutions work except for 1 thing.
Company_member is set for limit to list.
Because you are changing the rowsource of company_member each time you update company, some of the company_member boxes on the continous form will now contain values which they are "not allowed".
All the instances of the combobox control on the form contain the same rowsource.
When this happens it causes the values in the company_member box not to show.
If I make the bound column = 1 and put the company_memberID as column 1 then I dont get this problem.
Unfortunately I need to display the company_member_name.
Help ?
Struggling here in a big way.
ps: I can put a text box on the screen and use dlookup to find the value based on the ID in the combobox but this makes the form horribly slow and is really not a decent solution.
A [company] combobox and a [company_member] combobox.
If you select a company it should update the rowsource of the [company_member] box to only show the members in that company.
Both combo boxes have
BOUND COLUMN = 2 (So that I can display the names, but bind the comboboxes the ID fields)
LIMIT TO LIST = true (mandatory if using multiple fields in combobox)
Problem! I have tried 2 things here.
1)
I have tried making a rowsource for company_member which is dependant on the value of the company field.
2)
I have tried placing an event on after_update of company
which updates the rowsource of company member.
Both of these solutions work except for 1 thing.
Company_member is set for limit to list.
Because you are changing the rowsource of company_member each time you update company, some of the company_member boxes on the continous form will now contain values which they are "not allowed".
All the instances of the combobox control on the form contain the same rowsource.
When this happens it causes the values in the company_member box not to show.
If I make the bound column = 1 and put the company_memberID as column 1 then I dont get this problem.
Unfortunately I need to display the company_member_name.
Help ?
Struggling here in a big way.
ps: I can put a text box on the screen and use dlookup to find the value based on the ID in the combobox but this makes the form horribly slow and is really not a decent solution.