K
Kevin Sprinkel
I recently posted a question regarding data
that "disappeared" from a combo box. This happened when
the AfterUpdate event of the previous combo box set the
its Row Source in a continuous form. Since Access only
maintains one recordset for the combo box, rather than one
for each record, records whose value was not in the domain
of the current Row Source definition "disappeared".
A user was helpful in pointing me to a work-around that
opens a pop-up form to enter the combo box data, then
displays the results in text boxes using DLookup on the
continuous form.
I think I've found another solution which avoids a second
form. I set the Row Source in form design view to the
entire domain of values it could take--i.e., the union of
all values associated with each combo box one choice. The
GotFocus event of cbo2 sets the Row Source to the
appropriate narrowed view, and its LostFocus event resets
it to the original default. The values continue to
display in each record.
I haven't thoroughly tested this yet, but it seems to
work. If anyone sees any limitations to using this
method, please post them.
Best regards.
Kevin Sprinkel
that "disappeared" from a combo box. This happened when
the AfterUpdate event of the previous combo box set the
its Row Source in a continuous form. Since Access only
maintains one recordset for the combo box, rather than one
for each record, records whose value was not in the domain
of the current Row Source definition "disappeared".
A user was helpful in pointing me to a work-around that
opens a pop-up form to enter the combo box data, then
displays the results in text boxes using DLookup on the
continuous form.
I think I've found another solution which avoids a second
form. I set the Row Source in form design view to the
entire domain of values it could take--i.e., the union of
all values associated with each combo box one choice. The
GotFocus event of cbo2 sets the Row Source to the
appropriate narrowed view, and its LostFocus event resets
it to the original default. The values continue to
display in each record.
I haven't thoroughly tested this yet, but it seems to
work. If anyone sees any limitations to using this
method, please post them.
Best regards.
Kevin Sprinkel