Running Events on a SubForm

N

Nuno Guerra

I have one Sub-Form with multiple comboboxes.
The events associated to each combobox in the subform doesn't work.

Each combobox has a query in the row source with a criteria that depends on
a value of the previous combobox.
Althought none of the events associated to the combobox works... my problem
exists when the second combobox has to make a requery when the first combobox
changes value.

simple example:
MainForm_A
Field1
SubForm_A
Combobox_A
Combobox_B = (select field from table where criteria = combobox_A.value)

This SubForm_A is multirecord. So when I create a new record the list of
values of the Combobox_B mantains related to the previous Combobox_A from the
first record and not of the Combobox_A of the current record.

I put the requery on the Changes Event on each combobox, but doens't work.

any help
 
M

Marshall Barton

Nuno said:
I have one Sub-Form with multiple comboboxes.
The events associated to each combobox in the subform doesn't work.

Each combobox has a query in the row source with a criteria that depends on
a value of the previous combobox.
Althought none of the events associated to the combobox works... my problem
exists when the second combobox has to make a requery when the first combobox
changes value.

simple example:
MainForm_A
Field1
SubForm_A
Combobox_A
Combobox_B = (select field from table where criteria = combobox_A.value)

This SubForm_A is multirecord. So when I create a new record the list of
values of the Combobox_B mantains related to the previous Combobox_A from the
first record and not of the Combobox_A of the current record.

I put the requery on the Changes Event on each combobox, but doens't work.


You need the requery in both the first combo boc's
AfterUpdate event and in the form's Current event.
 
Top