Results 1 to 11 of 11
  1. #1
    PATRICKPBME is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2016
    Posts
    171

    How do I get query to use same report format

    I have a simple query that I use to generate a report on individual property leases/contracts. The only thing that changes in each query is the number of the contract which limits the information generated to that particular contract (names, dates, rate, etc.) However, when I first generated the report I had to modify/edit it quite a bit to get it to look just the way I need it to. I don't want to have to do that every time I run a query. My question is, can I run a query and make it so that when I use the data and create a report it will use the same "template" that I have for the first report I ran? Thank you!

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    Start with the working report,edit, Save As newName.
    now change this new report.

  3. #3
    PATRICKPBME is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2016
    Posts
    171
    Yes, but how do I get the information needed into the new report? Maybe what I am asking can't be done. Put another way, I have a report I will call report A. It has all of the info needed for property A produced by the query I ran. When I run the query for property B, I want the resulting info in the same format as that for Property A w/o having to reformat the report every time. Let's say I open report A, delete all of the data it contains and I am left with a "clean" report template. I save it as Report Template. What I want to be able to do, if possible, if run query for Property B and somehow tell access, "Okay, now take that data and put in to the Report Template." I don't want to have to reformat the report every time I have a new property.

  4. #4
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Instead of messing with the Report, change the query that the Report uses (not the query name, that will never change, but rather what the query does).

    A few ways that this can be done:
    1. Use a Parameter Query that prompts the User for the Criteria inputs. Then every time you go to open the Report, it will ask you for the Criteria. So the Report is always the same, but the data it returns is dynamic.
    2. Use a Form where they can enter Criteria and other selections, and build the SQL code for the query on-the-fly, and apply it to the query that the Report uses.

  5. #5
    PATRICKPBME is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2016
    Posts
    171
    Joe:

    I think #1 is what I will take a shot at and will grab my book to learn about parameter queries. Novice at best at the moment with Access. So, if I would do this, I am thinking I would save a blank form and assuming I set it up correctly it will ask me for parameters when opened? Thank you!

  6. #6
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    No forms used at all with Parameter Queries.
    In Parameter Queries, your Query Criteria are set up as questions.
    You'll see when you get there...

  7. #7
    trevor40's Avatar
    trevor40 is offline Advanced db Manager
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2014
    Location
    Australia
    Posts
    402
    Quote Originally Posted by JoeM View Post
    No forms used at all with Parameter Queries.
    In Parameter Queries, your Query Criteria are set up as questions.
    You'll see when you get there...
    quick hint...

    in the query window put the following,

    put this under the relevant field in the criteria section
    [Enter the new Invoice # or Order number]

    put as many as you need to filter to the correct data.

    it will then prompt you for that information when you run the report, as long as the report is based on that query, this will then only give you that data for the report.

  8. #8
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    You might find this helpful:
    http://www.fontstuff.com/access/acctut01.htm

  9. #9
    PATRICKPBME is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2016
    Posts
    171
    Well the good news is that I am getting pretty good with parameter queries. However, that doesn't seem to help me with the report problem which I may not be explaining very well so I will try again.

    My first step is to creating a query which will get the data I need. That I am able to do.
    The second step is creating a report which I do by clicking "create" and "report". That I am able to do.
    The report pops up and I format that report to make it very easy to read by my end user. I have to change the font, margins, etc. Once it looks as I want it, I save the report.

    Then, I want to go on to the second report with which I am dealing. I change the query setting to the criteria for the data just for that property, just like I did for the first property Every field is identical and all I change is the property number. I run the query and again get all the data I need. This is where the "problem" arises.

    The problem is when I create that second report I have to once again change the font, margins, etc. What I am trying to figure out is how to set this up so that when I create the report all those settings already exist in the resulting report so I don't have to set them up with every new property I run.

  10. #10
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    The problem is when I create that second report I have to once again change the font, margins, etc. What I am trying to figure out is how to set this up so that when I create the report all those settings already exist in the resulting report so I don't have to set them up with every new property I run.
    You shouldn't have to do this.

    If the only thing that is changing is the data due to the Parameter Query, all you need is one Query and one Report.
    So, you go through the first time, and your have your Report linked to your Parameter Query.
    Now, to run a second similar looking Report based on different data, simply open the Report (not the Query)! Opening the Report will bring up your Parameters to fill out, and then return the Report based on the new data.

    So once you have set it up, you don't need to open the Query directly anymore. Just open the Report based on the Parameter Query and everything flows dynamically!

  11. #11
    PATRICKPBME is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2016
    Posts
    171
    Thank you very much. That does indeed work. I set it up with three separate "or" options to search in different ways. The only thing I am wondering is if there is any way I can have a screen pop up that will give the three alternatives all at once instead of having to go through them separately, whether a parameter is entered or not. No big deal. Appreciate everyone's help and will keep experimenting.

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

Similar Threads

  1. Report format
    By smallclone in forum Reports
    Replies: 1
    Last Post: 02-23-2015, 06:51 AM
  2. Report Format Problem
    By Dave_Stjohn in forum Access
    Replies: 1
    Last Post: 06-21-2012, 08:22 AM
  3. Format Report
    By hellojosie in forum Access
    Replies: 2
    Last Post: 11-21-2011, 10:37 AM
  4. Report in pdf format
    By Alex Motilal in forum Reports
    Replies: 3
    Last Post: 01-02-2011, 07:25 AM
  5. How to format text in a report
    By Kimelco in forum Access
    Replies: 1
    Last Post: 01-06-2006, 07:30 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