Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Apr 2005
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cross Tab Query (Access 2000)

    Is there a way to pass a user entered date into a crosstab query? I use the active x calendar control on a form to pass a date to a query and that works fine. I even run forms off of it. The problem is when I try to run cross tab queries off of the original queries, it never accepts a passed date. If I copy the existing query, add a firm date parameter into it (between...and), and build the crosstab off of that, then it works. It would be great to have crosstab queries work in the same fashion.

    Does anyone know how to use user entered dates in crosstab queries?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Cross Tab Query (Access 2000)

    You must declare the parameter explicitly in the query where it is used in the Criteria row:
    - Open this query in design view.
    - Select Query | Parameters...
    - Enter the date parameter exactly as it is used in the criteria line, for example

    [Forms]![frmMyForm]![txtMyDate]

    - Select Date/Time as data type.
    - Repeat if you have more than one parameter.
    - Click OK.
    - Close and save the query.
    The crosstab query should now recognize the parameter.

  3. #3
    Star Lounger
    Join Date
    Apr 2005
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Cross Tab Query (Access 2000)

    Parameters! Thats it! This worked great Hans- thank you very much.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •