Results 1 to 2 of 2
  1. #1
    aceSoft is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2017
    Posts
    8

    Filter report inside a form

    Hello there im searching for code where i can filter a report that is placed inside a form.
    Normally in opening a report the code is Docmd.OpenReport,,, however in my case the report is already inside my form and
    im suppose to hit a button to apply filter on it. Can Anybody guide me o please.

    1. I have a Report inside a Form
    2. I have a Dropdown Menu to select Item on it (Once Selected)


    3. I will hit a button to apply filter and show it on my Report inside that form.

    Im in need of a code where i can filter that report and reload data on it. thank you. kindly please help.

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    If cboBox has the data to filter...

    Code:
    If Not IsNull(cboBox) then sWhere ="[field]='" & cboBox & "'"
    Docmd.openreport "rMyReport", acVeiwPreview,,sWhere

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

Similar Threads

  1. Replies: 0
    Last Post: 02-29-2016, 05:27 PM
  2. Cannot display OLE object inside report
    By togo in forum Reports
    Replies: 9
    Last Post: 11-02-2012, 12:39 PM
  3. Replies: 1
    Last Post: 09-05-2012, 07:04 AM
  4. Replies: 1
    Last Post: 06-25-2012, 07:01 PM
  5. It is illegal to call out while inside message filter
    By blueyedsamurai in forum Access
    Replies: 2
    Last Post: 12-16-2011, 12:24 AM

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