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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crosstab Query help with criteria 1

Status
Not open for further replies.

vich

Technical User
Sep 26, 2000
107
US
I have this union crosstab query that I would like to add selection critera based on a field from a form. However I get "The Microsoft Jet database engine does not recognize '[forms]![jobprocess].[job_id]' as valid field name or expression.

Any help would be appreciated.

Code:
 TRANSFORM Count(q_EquipmentLocationListUnion.EquipID) AS CountOfEquipID SELECT DateAdd("d",[startjobdate],[i]) AS DateInSvc, Sum(q_EquipmentLocationListUnion.Amps) AS SumOfAmps, Sum(q_EquipmentLocationListUnion.Rating) AS SumOfRating FROM Integers, q_EquipmentLocationListUnion WHERE (((Integers.i) Between 0 And DateDiff("d",[Startjobdate],[endjobdate])-1) AND ((q_EquipmentLocationListUnion.Job_ID)=[forms]![jobprocess].[job_id])) GROUP BY DateAdd("d",[startjobdate],[i]) ORDER BY DateAdd("d",[startjobdate],[i]) PIVOT q_EquipmentLocationListUnion.Type;
 
You have to define the parameter, e.g.:
PARAMETERS [forms]![jobprocess].[job_id] INTEGER;
TRANSFORM ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks!!

I had seen posts that sort of referred to that but couldn't quite see that it made sense. Hinesight is a wonderful thing.

You are to be commended for all of the help you provide.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top