Results 1 to 5 of 5
  1. #1
    RandyG is offline Novice
    Windows XP Access 2003
    Join Date
    Sep 2009
    Posts
    3

    Parameter in Crosstab Query

    How do I set a parameter for the criteria in a crosstab query? I have no problem in a regular query but can't get a crosstab query to recognize the parameter for a beginning and end date.



    Thanks,

    Randy

  2. #2
    dcrake's Avatar
    dcrake is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    435
    Alot depends on how you are calling the query.

    Is it sourced by a report? A form?
    How are you trying to set the parameters?
    You can create the crosstab without any parameters then bring down a date field form the underlying recordsource and apply a where condition on that field. Not forgetting to untick the column if you want to hide it.

    David

  3. #3
    RandyG is offline Novice
    Windows XP Access 2003
    Join Date
    Sep 2009
    Posts
    3

    Thumbs up Thanks for the info David

    I'm actually pulling the Crosstab Query from another Query that has the date parameters set up as [Enter Start Date] in the criteria. The Crosstab doesn't recognize the parameter and it won't let me set the same type of parameter under that record set in the crosstab.

    I'm not very skilled at Access because I don't use it much. However, I did find a work around by creating another table and quering the information to it and then doing the crosstab query on that table. I set up a macro to delete the tables records, run an append query and then run the crosstab query so I got it working like I needed to.

    I should try assigning a form to the criteria it sounds like and it might be easier.

    Thanks for your help,

    Randy

  4. #4
    dcrake's Avatar
    dcrake is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    435
    If you remove the date parameter from the first query but leave the date in there, then in the crosstab query include this date field and parameterise this field the cross tab should work without the need to use a temp table.

    David

  5. #5
    RandyG is offline Novice
    Windows XP Access 2003
    Join Date
    Sep 2009
    Posts
    3

    Thanks!

    Thanks David...I'll give it a try.

    Randy

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

Similar Threads

  1. crosstab query criteria
    By Sharron in forum Queries
    Replies: 3
    Last Post: 12-15-2011, 04:31 AM
  2. Replies: 16
    Last Post: 09-23-2009, 08:47 AM
  3. crosstab query calculation
    By rutica in forum Queries
    Replies: 2
    Last Post: 04-28-2009, 09:52 AM
  4. Criteria in Crosstab Query
    By wasim_sono in forum Queries
    Replies: 1
    Last Post: 12-12-2006, 05:14 AM
  5. Replies: 2
    Last Post: 11-09-2005, 02:51 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