Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Apr 2005
    Location
    Kansas City, Missouri, USA
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Filtering Reports (Access Pro 2000)

    I am trying to filter a report based upon [Client_Number]. I want to access the report from a FORM so I have created a command button.
    It is not filtering the report, it is pulling up the complete report with ALL client numbers.

    Here is my code:

    What am I missing?

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "rptBy_Client"
    stLinkCriteria = "[Client_Number]=" & Me![Client_Number]
    DoCmd.OpenReport stDocName, acViewPreview, , , , stLinkCriteria

    Thanks Stacy

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Filtering Reports (Access Pro 2000)

    You've got too many commas in the instruction. Try

    DoCmd.OpenReport stDocName, acViewPreview, , stLinkCriteria

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •