Link to home
Start Free TrialLog in
Avatar of SteveL13
SteveL13Flag for United States of America

asked on

Trying to open a report with a filter

I have this code in the onclick code of a command button on a form...

    Me.Filter = "ListApptBestAgentBusiness" = -1
    Me.FilterOn = True
    
    DoCmd.OpenReport "rptListingAppointmentsSet", acViewPreview, "", "", acNormal

Open in new window


The report is supposed to be displaying only the records where ListApptBestAgentBusiness is True

But it is displaying all records and not filtering.  Thoughts?
ASKER CERTIFIED SOLUTION
Avatar of PatHartman
PatHartman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SteveL13

ASKER

Perfect.  Thank you.