G
Guest
I have a report that I want to call from a form. I want to have the user
select the LastName of a person and filter the results of the report for that
person. However if LastName is blank, I want the total report. I currently
have the following code:
stDocName = "My Report"
DoCmd.OpenQuery "stDocName", acViewNormal, acEdit
and the query is set up to use [myForm]![LastName] as a criteria.
When I select a last name, the form works as expected, however it returns no
records when I have no last name selected. I understand this is happenning
because there aren't any last names that match "". Is there an easy way to
configure my query or report to reproduce the desired results?
Thank you
select the LastName of a person and filter the results of the report for that
person. However if LastName is blank, I want the total report. I currently
have the following code:
stDocName = "My Report"
DoCmd.OpenQuery "stDocName", acViewNormal, acEdit
and the query is set up to use [myForm]![LastName] as a criteria.
When I select a last name, the form works as expected, however it returns no
records when I have no last name selected. I understand this is happenning
because there aren't any last names that match "". Is there an easy way to
configure my query or report to reproduce the desired results?
Thank you