Results 1 to 4 of 4
  1. #1
    mari_hitz is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2011
    Posts
    28

    2 Subreports on main form

    Hi everyone,



    Hope you are great. I wanted to know if what I am trying to do is possible. I have a table with tasks for different countries, then I have a query that filters the table depending on the Country inserted on the criteria parameter pop up. Then I created a report based on the query.
    If I would like to compare two countries with the same report, I tough to make a form containing two sub reports and in the form above each report put a combobox with the list of countries. Then if somebody would like to compare two countries they will have to choose from each drop downs the countries to compare and the sub reports would be updated with the data of the countries chosen.
    Is this possible? How can I do it? I tried to search on the Internet this but I did not find any answer, I know there is something with requery, but I don't understand how to do it.
    Could you please guide me?

    Thanks!

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,441
    I am not sure I understand the question but let me see if I do.

    You have a report that prints out what you want just fine.

    What you want to do is have this report compare two countries side by side for a comparison. The problem is that you don't know how to select 2 countries for a query

    The easiest way I can figure to do this is to have two combo boxes on your form (instead of, I assume, 1 right now)

    In the criteria if the query driving the report you could have a criteria in your COUNTRYID field of:

    [Forms]![FORMNAME]![Combo1] or [Forms]![FORMNAME]![Combo2]

    Your query should return two records instead of 1 (one record for each country) Then you can build a report around the two record query.

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Report view does allow some interaction but reports are not intended to be interactive, this is what forms are for. Could just use subforms.
    Regardless, RecordSource would be dynamic parameterized query with parameter referencing combobox on form. Then click the refresh on ribbon or build button with requery code.
    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.

  4. #4
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    As the others have noted, your post is a little difficult to interpret; but in general yes one can certainly compare 2 different countries that are dynamically selected by the user. It is not however a generic feature so it is all about learning to design. If you want your results to be a comparative report - then you must set it up generically with Country 1 and Country 2.... then you need to work backwards and establish a form whereby the user can select/enter the countries - which in turn serve as criteria for the query which is in turn the record source of your report......

    Beyond novice status, sure, and difficult to find a precise guide on the internet because it is very custom.....but very do-able.....

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

Similar Threads

  1. Replies: 1
    Last Post: 10-16-2013, 03:44 PM
  2. Replies: 17
    Last Post: 08-22-2013, 08:22 AM
  3. Empty Main Report, won't run subReports
    By rankhornjp in forum Reports
    Replies: 8
    Last Post: 03-15-2013, 11:07 AM
  4. Replies: 1
    Last Post: 11-24-2012, 04:40 PM
  5. Replies: 2
    Last Post: 11-13-2012, 02:11 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