combo box based on a second combo box not working

M

magicdds-

I have 2 combo boxes on a continuous form.
After selecting one of 4 choices in combobox1 (from a value list), the
afterupdate property is activated to assign the rowsource property of
combobox2.
After selecting a choice from combobox2, both comboboxes display the choices
in record 1. (Both comboboxes are bound)

When you go to record 2, if the choice made in combobox1 is the same as for
record 1, the data displayed in record 1 remains unchanged. If in record 2, a
different choice is made in combobox1, the display in combobox2 for record 1
disappears (the reason is because the rowsource property of combobox2 has
changed). When you put the focus back on record 1, the oncurrent property
causes combobox2 of record 1 to show the correct data, but now the display on
combobox2 record 2 has now disappeared (again, because the rowsource property
of combobox2 was changed to the table for record 1.)

Is there a way to change the rowsource property of combobox2 in upcoming
records and still display the selected choices for the previous records?

Thanks for any help.
Mark
 
W

Wolfgang Kais

Hello Mark.

magicdds- said:
I have 2 combo boxes on a continuous form.
After selecting one of 4 choices in combobox1 (from a value list),
the afterupdate property is activated to assign the rowsource
property of combobox2.
After selecting a choice from combobox2, both comboboxes display
the choices in record 1. (Both comboboxes are bound)

When you go to record 2, if the choice made in combobox1 is the
same as for record 1, the data displayed in record 1 remains
unchanged. If in record 2, a different choice is made in combobox1,
the display in combobox2 for record 1 disappears (the reason is
because the rowsource property of combobox2 has changed). When you
put the focus back on record 1, the oncurrent property causes
combobox2 of record 1 to show the correct data, but now the display
on combobox2 record 2 has now disappeared (again, because the
rowsource property of combobox2 was changed to the table for record
1.)

Is there a way to change the rowsource property of combobox2 in
upcoming records and still display the selected choices for the
previous records?

I don't think so. Why not use the single form view? An alternative
solution could be to display the selection in a textbox with a
calculated value using a selfmade lookup function, and place that
textbox on top of combobox2 such that it covers the textbox part
of the combobox.
 
R

ramzyh

" I have 2 combo boxes on a continuous form. After selecting one of 4
choices in combobox1 (from a value list), the afterupdate property is
activated to assign the rowsource property of combobox2."

What do you type in the afterupdate field of Combo box 1 to be able to
do this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top