Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2003
    Location
    Thailand
    Posts
    1

    Unhappy Unanswered: Crosstab can't use criteria

    I wanna use criteria from my current form by use Forms![frm_main]![mai_cas_code] but it show message "Microsoft Jet Database can't recognize an invalid expression..." but on simple query can use that criteria How do I go on???

  2. #2
    Join Date
    Apr 2003
    Location
    Santa Barbara, CA
    Posts
    67

    Re: Crosstab can't use criteria

    Originally posted by naroxmis
    I wanna use criteria from my current form by use Forms![frm_main]![mai_cas_code] but it show message "Microsoft Jet Database can't recognize an invalid expression..." but on simple query can use that criteria How do I go on???
    Select the data in a query and Crosstab the query.

  3. #3
    Join Date
    Jan 2003
    Posts
    17
    I have exactly the same problem. I tried the solution you recommended ie put the criteria in a seperate select query, then create a crosstab form that. It still creates the error Naroxmis says.

    The select query with form parameters runs fine by itself, but once used as the datasource to a crosstab query, it creates an error.

    I have spent hours on 4 different Access forums, and nobody seams to have an answer to this one.

    Any really clever ones out there!

  4. #4
    Join Date
    Apr 2003
    Posts
    9

    moe

    The way to do this is to create a temp table based on the crosstab query then query the table as a select query. This is one way to do it. To create a temp tabel you have to create a make table query.

  5. #5
    Join Date
    Jan 2003
    Posts
    17

    Smile

    Moe

    Thanks for your suggestion. I happened to find a solution anyway. It appears if you want to create a crosstab query from a select query that uses parameters supplied from a form. It is necessary to pre-define the parameters you intent to use from the form in both the select query and the crosstab query. It then works!

    Sametch

Posting Permissions

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