I need some help filtering records in a subform.
The subform is based on a table.
The parent form is unbound and has a combo list from which the user can select a number. The idea is that when the number is selected from the combo, the subform automatically re-filters to show only the records with a matching number field.
I have used the after_update event of the combo to change the recordsource of the subform and then requery it, but it errors saying that it cannot find the form.
I am referencing the subform using:
[Forms]![Formname].recordsource="some sql.........;"
but this doesn't seem to work.
Is there another way of referencing subforms in VBA?
The subform is based on a table.
The parent form is unbound and has a combo list from which the user can select a number. The idea is that when the number is selected from the combo, the subform automatically re-filters to show only the records with a matching number field.
I have used the after_update event of the combo to change the recordsource of the subform and then requery it, but it errors saying that it cannot find the form.
I am referencing the subform using:
[Forms]![Formname].recordsource="some sql.........;"
but this doesn't seem to work.
Is there another way of referencing subforms in VBA?