Results 1 to 4 of 4
  1. #1
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Report Filter Not Working For Me Access 2010

    Report Filter Not Working For Me

    I'm using Microsoft Access 2010 (14.0.6024.1000) SP1 MSO (14.0.6112.5000)
    I'm using Microsoft Windows 7 Professional Service Pack 1


    Trying to print a one page report from a form that has the record to be printed with filter key of lngDLicenseID

    DoCmd.OpenReport strDocName, acPreview, , "lngDLicenseID = " & Me.lngDLicenseID

    The filter isn't working all the records in the database are printing

    Design view on the report property reveals:

    Record Source: qrytbl_Dlicense
    Filter: ([lngDLicenseID]=1)

    Keep in mind the same Code App.mdb & data App_Be.mdb system works on 2000, 2002, 2003 and 2007 systems

    Any ideas

    Thanks, John
    11397335

  2. #2
    Administrator
    Join Date
    Jun 2010
    Location
    Portugal
    Posts
    12,519
    Thanks
    152
    Thanked 1,398 Times in 1,221 Posts

  3. #3
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks ruirib, you solved my problem, now I can proceed further on the Access 2010 minefield

    I now notice that this only is a problem on reports in which the RecordSource is changed in the Report_Open event.

    It appears that when the RecordSource is changed in Report_Open, the Filter property, which would normally receive the WhereCondition doesn't "stick". All records are retrieved for the report instead of the desired 1 filtered record

    This seems to be a problem with Access 2010 only after SP 1 is applied

    In Office 2010 SP1, the OpenReport method loses WhereCondition
    http://answers.microsoft.com/en-us/o...f-aead50887916

    Description of the Access 2010 hotfix package (Access-x-none.msp): October 25, 2011
    http://support.microsoft.com/kb/2596496
    Microsoft Access 2010 (14.0.6024.1000) SP1 MSO (14.0.6112.5000) after SP1
    Microsoft Access 2010 (14.0.6111.5000) SP1 MSO (14.0.6112.5000) after hotfix

  4. #4
    Administrator
    Join Date
    Jun 2010
    Location
    Portugal
    Posts
    12,519
    Thanks
    152
    Thanked 1,398 Times in 1,221 Posts
    Glad that helped .

Posting Permissions

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