Results 1 to 6 of 6
  1. #1
    james28 is offline Advanced Beginner
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2014
    Posts
    92

    Crosstab Query Chart Issue

    Hello All,

    I have a select query that works just fine. As one of the criteria, I have [Forms]![SearchForm]![TxtSearchDate] . If I have "SearchForm" open and a date in "TxtSearchDate", I can run the query and it works just fine.


    Basic Option:
    If I create a regular column chart from the query that is looking at 1 value, it also works just fine. For example, in my query, I have a column that is animal (cat, dog, fish, etc). My chart shows the each animal as one bar, with the number of each animal represented.

    Advanced Option:

    I am running into problems when I create a stacked column chart that uses an additional value. For example, in my query, I have a column that is animal (cat, dog, fish, ect) and another column that is State (NY or PA). My chart should show each animal as one bar, with the bar being segmented into two parts, one for each state.



    If I do not list the field as criteria for the query, everything works as I expect it to run and I am able to create the stacked column chart.

    When I introduce the field criteria, I get an error saying, "The Microsoft Access database engine does not recognize '[Forms]![SearchForm]![TxtSearchDate]' as a valid field name or expression.




    If I change the row source of the chart to a select (instead of a cross tab), the chart is able to display without any errors and it loads using [Forms]![SearchForm]![TxtSearchDate]; however, it is only the chart that is explained in Basic Option above.



    My goal is to have the chart explained in Advanced Option display with a field that allows me to specify the date.

    I would appreciate any guidance in resolving this issue. Thank you!

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Crosstab queries require the parameters be explicitly declared. I think it's on the ribbon in 2010.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    james28 is offline Advanced Beginner
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2014
    Posts
    92
    Paul,

    Thank you for the reply. I was able to find the parameters area on the ribbon; however, I can not seem to make anything function. As far as the parameter goes, I am putting [Forms]![SearchForm]![TxtSearchDate] in as the parameter and I have tried both long integer and date/time in the data type. Is there a different way that I should be entering the parameter?


    Thank you again!

  4. #4
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I would expect that to work. Here's an A2k link, but other versions would work the same, other than how to get at the parameters:

    http://support.microsoft.com/default...b;en-us;209778

    What's the SQL of the query now? It should start with Parameters now.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    james28 is offline Advanced Beginner
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2014
    Posts
    92
    Paul,

    Thank you for the reply. I see where I went wrong. I was adding the parameter to the graph, not to the query. Thank you for the clarification. It is working now!

  6. #6
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Excellent! Happy to help.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Pie Chart formatting issue
    By Kyle02 in forum Access
    Replies: 2
    Last Post: 08-26-2013, 01:39 PM
  2. CrossTab Query - Report Issue ?
    By AndreasPanayiotou in forum Reports
    Replies: 0
    Last Post: 09-25-2012, 01:11 AM
  3. Crosstab Query issue
    By ryanwoehl in forum Queries
    Replies: 1
    Last Post: 01-24-2012, 08:44 PM
  4. Crosstab issue
    By teedee in forum Queries
    Replies: 5
    Last Post: 02-07-2011, 10:49 AM
  5. Line-Bar Chart Issue
    By santoshpk in forum Reports
    Replies: 0
    Last Post: 03-17-2009, 02:47 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