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

Query help?

Status
Not open for further replies.

stapet

Programmer
Mar 20, 2003
22
US
Can someone please help with what I am doing wrong here? I'm not an expert programmer, but do try hard... :)


SELECT Prdctnentry.WorkOrderNo, Prdctnentry.MachineAmount, GRASSLAND_dbo_PT_CaseLot.LotSize, Prdctnentry.Date
FROM Prdctnentry LEFT JOIN GRASSLAND_dbo_PT_CaseLot ON Prdctnentry.WorkOrderNo = GRASSLAND_dbo_PT_CaseLot.WorkOrderNo
WHERE (((GRASSLAND_dbo_PT_CaseLot.LotSize)<[Prdctnentry].[MachineAmount]) AND ((Prdctnentry.Date)=[Please enter a production date:]));

I get the following error message...

"This expression is typed incorrectly, or it is too complex to be evaluated. For example, a numeric expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables."

Thanks for any help!

 
I found it....thanks anyway everybody.

I had to change my select statement to..

SELECT Prdctnentry.WorkOrderNo, Prdctnentry.MachineAmount AS MAmount, GRASSLAND_dbo_PT_CaseLot.LotSize, Prdctnentry.Date
FROM Prdctnentry LEFT JOIN GRASSLAND_dbo_PT_CaseLot ON Prdctnentry.WorkOrderNo = GRASSLAND_dbo_PT_CaseLot.WorkOrderNo
WHERE (((GRASSLAND_dbo_PT_CaseLot.LotSize)<"MAmount") AND ((Prdctnentry.Date)=[Please enter a production date:]));
 

I would suggest to avoid using reserved words as your field names:
[tt]Prdctnentry.Date[/tt]


Have fun.

---- Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top