Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crosstab criteria

Status
Not open for further replies.

Joey4Js

Technical User
Sep 5, 2002
9
0
0
AU
Hi everyone,

I have two questions, and would appreciate any help you can give me.

1. I have a crosstab query, that lists job number vs date vs a number of items. I want to make the criteria for the job number the openargs from a form. However when I put in [Forms]![IssueForm].[OpenArgs] as the criteria in my query design box, I get the following error message: The Microsoft Jet Engine does not recognise [Forms]![IssueForm].[OpenArgs] as a valid field name or argument.

2. I cannot figure out how to limit the query to the top 12 dates (which are the column headings.

Here is my SQL code if it helps:

TRANSFORM First(JoeTest1.Copies) AS FirstOfCopies
SELECT JoeTest1.JobID, JoeTest1.[Company Name], JoeTest1.Contact
FROM JoeTest1
GROUP BY JoeTest1.JobID, JoeTest1.[Company Name], JoeTest1.Contact
ORDER BY Format([Date of Issue])
PIVOT Format([Date of Issue]);

Thanks,

Joe.
 
I have the same problem. If you remove the TRANSFORM and PIVOT it will probably work, but then it isnt crosstab anymore. I haven't been able to figure this out and it is bugging me too.

Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top