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

Fixed month variable year

Status
Not open for further replies.

Ali29J

Technical User
May 13, 2004
203
GB
Hi

I have a query which I am trying to return values for a month, showing sales orders received, however the year is variable based on chosen year in a form Combo10...can anyone help me out on the code for this?

THanks ALi
 
Little more info, below is current SQL code

SELECT RFQDetail.Customer, PO.Direct, PO.Hub, IIf(PO.POCurrency="GBP",PO!POUnitPrice*PO!QtyOrdered*forms!SalesOrdersExport!Text70) AS calculatedtotal, IIf(PO.POCurrency="EUR",PO!POUnitPrice*PO!QtyOrdered*forms!SalesOrdersExport!Text68) AS calculatedtotal1, IIf(PO.POCurrency="USD",PO!POUnitPrice*PO!QtyOrdered) AS calculatedtotal2, IIf(PO.POCurrency="RMB",PO!POUnitPrice*PO!QtyOrdered*forms!SalesOrdersExport!Text95) AS calculatedtotal3, PO.Date, PO.POCurrency
FROM RFQTracker INNER JOIN (RFQDetail INNER JOIN PO ON RFQDetail.ItemID = PO.ItemID) ON RFQTracker.RFQ = RFQDetail.RFQ
WHERE (((PO.Date)=#1/1/2005#));


at present you will note the date is fixed at 1/1/2005, i would like this to show a whole month for the particular year chosen in the combo box...
 
Something like this ?
WHERE Month(PO.Date)=DesiredMonthNumberHere
AND Year(PO.Date)=[Forms]![mainform name]![year combo name]

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

That works great thanks for your help

ALi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top