Results 1 to 7 of 7
  1. #1
    kloun04 is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jun 2014
    Location
    Wisconsin
    Posts
    33

    Need specific data from Qry to pull into Report

    Experience level: Just above novice.
    I have a table called "Presentations" that have a field called "CoalitionMeeting" with three options (ALF Coalition, SNF Coalition, ALF/SNF Coalition) to choose from when entering my data.
    I have a query called "Coalition Presentations" where I pull in all of the data that I need for my report. The query is currently includes the field "CoalitionMeeting" but no specific criteria is identified.
    In my report I have an unbound text box with the control source "CoalitionMeeting". What I need is for this box to pull one of the three options listed above in my table, e.g., ALF Coalition.
    I have written 3 queries to get around this issue, but I know this is not the way to go. I know there is a simple expression I can probably use to pull in from one query, but I don't know what it is.

    Thanks!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    Not clear what the issue is. Build query that includes related data for report recordsource. Apply filter criteria as appropriate.
    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
    kloun04 is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jun 2014
    Location
    Wisconsin
    Posts
    33
    Hmmm, not sure if your answer is what I'm looking for.

    I have created 3 queries to pull in my "CoalitionMeeting" data (ALF Coalition Presentations, SNF Coalition Presentations, and ALF_SNF Coalition Presentations) to 3 corresponding reports (ALF Coalition Presentations, SNF Coalition Presentations, ALF/SNF Coalition Presentations.) What I would like is to have only 1 query with the CoalitionMeeting field included and then filter the data on the back end of the report in the Expression Builder. I don't know the code to write in the expression builder to filter what I want for each report based off of the query.

    The bottom line is I would like to have 1 query and 3 reports.

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    I suggest you post a copy of your database in zip format.

    I recognize you want to produce a report. However, it might be helpful to readers if you would describe (in plain English) the purpose of the database and the report. A little context often leads to more focused responses.

    Goo luck.

  5. #5
    kloun04 is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jun 2014
    Location
    Wisconsin
    Posts
    33
    And here I thought I was speaking in plain English
    Attached is my db. Ignore the Start Form... it's copied over from a similar db and under construction.
    Hopefully, after you look at the db what I said in my earlier post today will make more sense. Again, I want three separate reports pulling data from 1 query instead of 3 (if it's doable) using the 3 different CoalitionMeeting types.
    Attached Files Attached Files

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    Of course it's doable. Apply filter criteria for desired coalition type when opening/printing report. Close report. Open again with different criteria. How the criteria is passed to report can be accomplished more than one way. Code can even automate output of 3 reports to print or pdf.

    Or use report design to group the records by coalition type. Set for new page when coalition changes.
    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.

  7. #7
    kloun04 is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jun 2014
    Location
    Wisconsin
    Posts
    33

    Thumbs up

    Aha... filter on opening report worked like a charm. Thanks for explaining in novice terms.

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

Similar Threads

  1. Pull corresponding data into report
    By mrt1069 in forum Reports
    Replies: 3
    Last Post: 08-29-2016, 02:29 PM
  2. Replies: 2
    Last Post: 08-22-2014, 12:02 PM
  3. pull data from a specific record in a subform
    By pleshrl in forum Queries
    Replies: 3
    Last Post: 04-21-2013, 05:07 AM
  4. Replies: 1
    Last Post: 08-01-2012, 12:50 AM
  5. Code to pull in data from a specific record
    By jdunn36 in forum Access
    Replies: 1
    Last Post: 09-20-2010, 11:54 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