Results 1 to 7 of 7
  1. #1
    MikeKnight is offline Novice
    Windows XP Access 2000
    Join Date
    Oct 2012
    Posts
    4

    Getting the Access report to display query counts?

    Hi, I have a question about queries and reports. I've only been using Access for a day, so I'll try to make it as easy to follow as possible.

    What I have:
    -Table A is a list of solar panels, each with its own unique ID. The table has the installation date for each rack, labeled INSTALLDATE written as MM/DD/YYYY.
    -Table B has the same list of solar panels with their unique ID's. The table has the district each panel is in, labeled COUNCILDISTRICT assigned a number 1 through 12.

    Now what I want to to is make two reports that show two different things:


    -Report A needs to show the number of solar panels that were installed in each district in 2012 only.
    -Report B needs to show the number of solar panels that were installed in each district in 2012 each month.

    I've created two queries that give me the information I need:
    -Query A lists each council district in one column (labeled COUNCILDISTRICT) and the number of solar panels installed in 2012 in the next column (labeled COUNTOFINSTALLDATE1). I got this query by going in the design view making the following columns:
    --Field: CouncilDistrict. Table: tblB. Total: Group By.
    --Field: CountofInstallDate. Table: tblA. Total: Count.
    --Field: Year([InstallDate]). Total: Group by. Criteria: 2012.
    -Query B lists council districts, months (1-12), and the number of solar panels installed in that specific month in that district in 2012. I got this query by doing:
    --Field: CouncilDistrict. Table: tblB. Total: Group by.
    --Field: CountofInstallDate. Table: tblA. Total: Count.
    --Field: Expr1: Month([InstallDate]). Total: Group by. Criteria: Between 1 and 12.
    --Field: Year([InstallDate]). Total: Group by. Criteria: 2012. (Unchecked Show).

    Now, for some reason I'm not able to get the reports to display the counts that the queries display. For Report A, which shows installations in 2012 in each district, I have the control source for the text box set to CountOfInstallDate after selecting it through the menu. Yet every time I click on the report, it asks me to enter a parameter value for CountOfInstallDate instead of giving the values from the query. The same thing happens in Report B, I can't get it to display the CountofInstallDate values for each month of 2012 in each district.


    Any help on what I'm doing wrong? Thanks!

  2. #2
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529

  3. #3
    MikeKnight is offline Novice
    Windows XP Access 2000
    Join Date
    Oct 2012
    Posts
    4

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Want to provide db for analysis? Follow instructions at bottom of my post.
    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.

  5. #5
    MikeKnight is offline Novice
    Windows XP Access 2000
    Join Date
    Oct 2012
    Posts
    4
    Hi, sorry for the late reply. I have it attached to this post.

    I removed all the unnecessary information, tables, queries, reports, etc, and any confidential information.

    Thanks!panels.zip

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Re: rptCDInstalled2012
    Remove the query name from the ControlSource of textboxes.
    ControlSource for textbox in footer: =Sum([CountOfInstallDate1])
    What I can't figure out is why the report is prompting for CouncilDistrict parameter input.

    Re: rptInstalled2012bymonth
    This report is prompting for CouncilDistrict and Condition parameter inputs.
    Condition is name of textbox bound to Month field. Even after changing name the prompt still there.

    Where are these prompts coming from? Maybe corruption.

    I created new reports and copied all the controls. No prompts.
    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
    MikeKnight is offline Novice
    Windows XP Access 2000
    Join Date
    Oct 2012
    Posts
    4
    Hi, sorry for the late reply, I haven't had the chance to work on this.

    I think it was corruption, because I copied all the data into a new document and created queries and reports from scratch and it works fine now.

    Thanks.

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

Similar Threads

  1. Query Not Returning Zero Counts
    By TimMoffy in forum Queries
    Replies: 3
    Last Post: 07-05-2012, 10:08 PM
  2. Report which only counts
    By imintrouble in forum Access
    Replies: 1
    Last Post: 02-16-2012, 03:31 PM
  3. Counts & Calcuations in Select Query
    By BLD21 in forum Queries
    Replies: 4
    Last Post: 04-08-2011, 11:29 AM
  4. Replies: 4
    Last Post: 10-01-2010, 12:06 PM
  5. Reporting counts in another query...maybe?
    By Geewaagh in forum Queries
    Replies: 7
    Last Post: 06-04-2010, 07:39 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