The RecordSource of form or report can be reference to a table or a query or can be an SQL statement.
Even if the RecordSource is table, the form Filter property can be set to filter records. Code can set the Filter property.
The issue is applying filter criteria by the rules you define. I offered a query in post 27 that filters records. That query could be the RecordSource of form or report.