Eberhard already showed one possible way.
Once the form is loaded, you can use the Filter property with VBA to load the desired records.
I prefer to use an unbound form in my applications to set the filter conditions and then filter a subform.
Then I can use a linked table, ADODB recordset (select statement or call of stored procedure) as needed to fetch the appropriate data. (I use only active DBMS.)
docmd.OpenForm FormName:= "TestForm", WhereCondition:= "1=0"Once the form is loaded, you can use the Filter property with VBA to load the desired records.
I prefer to use an unbound form in my applications to set the filter conditions and then filter a subform.
Then I can use a linked table, ADODB recordset (select statement or call of stored procedure) as needed to fetch the appropriate data. (I use only active DBMS.)
Last edited: