G
Guest
I've got a form with two combo boxes, the choices available in the second box
being dependent upon the choice in the first. Now I'd like to trigger the
proper record to come up (in Form view of course) once that second choice is
made.
I've been told the following:
----------
You need a way to tell Access to find/load the record that corresponds to
the selection(s) you've made. One way is to filter the recordset the form
is bound to. Another is to based the form on the single record represented
by the choices.
To do the latter, change the query on which you base the form to include, as
a selection criterion for the ID field, a reference pointing to the ID of
the value selected in the combo box (the last one in the "cascade".
Then, in the AfterUpdate event of that last combobox in the cascade, use
something like:
Me.Requery
to force the form to rerun the query on which it is based.
being dependent upon the choice in the first. Now I'd like to trigger the
proper record to come up (in Form view of course) once that second choice is
made.
I've been told the following:
----------
You need a way to tell Access to find/load the record that corresponds to
the selection(s) you've made. One way is to filter the recordset the form
is bound to. Another is to based the form on the single record represented
by the choices.
To do the latter, change the query on which you base the form to include, as
a selection criterion for the ID field, a reference pointing to the ID of
the value selected in the combo box (the last one in the "cascade".
Then, in the AfterUpdate event of that last combobox in the cascade, use
something like:
Me.Requery
to force the form to rerun the query on which it is based.