Results 1 to 3 of 3
  1. #1
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 7 64bit Access 2003
    Join Date
    Feb 2011
    Posts
    1,919

    Sub-report okay as stand-alone, but Filter expression errors when used as sub-report

    I have a sub-report that formats and displays properly when run by itself. The On-Open code:



    Private Sub Report_Open(Cancel As Integer)
    Me.Filter = "[Provide Ride] > 0 AND [RetYear] = '2013'"
    Me.FilterOn = True
    End Sub

    However, that same code gets an error at Me.Filter = "[Provide Ride] > 0 AND [RetYear] = '2013'" when I attempt to run the parent report.


    I'm clueless as to what's different between the two.
    Any ideas as to what causes the error?
    Thanks,
    Bill

    Here's the error. (Too bad one can't paste images into a post)

    Click image for larger version. 

Name:	RidesError.jpg 
Views:	11 
Size:	20.0 KB 
ID:	12301

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,933
    Could set those criteria in the subreport RecordSource SQL.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 7 64bit Access 2003
    Join Date
    Feb 2011
    Posts
    1,919
    I keep jerking myself around on this one. I'm going to return to the idea of establishing a two column report and establish the two groupings. I just need to find out how to get the group section properties to come up so I can specify "NewRowOrCol" property.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Using an Iif expression in a report
    By jsfasman in forum Reports
    Replies: 2
    Last Post: 04-28-2013, 11:58 AM
  2. Expression on Report #Name?
    By burrina in forum Reports
    Replies: 0
    Last Post: 01-06-2013, 02:42 AM
  3. VBA Code to report syntax errors via email
    By jazzkenney in forum Programming
    Replies: 6
    Last Post: 11-30-2011, 08:54 PM
  4. Replies: 10
    Last Post: 07-25-2011, 12:07 PM
  5. dialog box errors in report
    By Jane in forum Programming
    Replies: 0
    Last Post: 11-20-2008, 01:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums