You can filter a form(or report's) recordsource when calling it via the DoCmd.OpenForm method. It is the {wherecondition} property. The wherecondition is a SQL WHERE statement without the word 'where'. It works very similar to the criteria property of a query.
You can always concatenate something into the where clause. For example, if you want to limit the form you're opening to the current record of the form you're on use something like the following:
This works alright once the record has been created but I fins it isn't picked up when creating new records.
i.e. entering a new record, press the button and it stays on autonumber even though a new record has been created for it. You can then move around the records, come back and it works fine...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.