G
Guest
Ok the end of the year is coming and I'm getting requests to alter my query.
Right now I have a query that selects the starting month, ending month, and
year from a form. How would I be able to select the starting month & year and
the ending month & year? This could be very simple but for some reason I
can't figure it out. I've attached the SQL from my current query below;
PARAMETERS [Forms]![frmCustomerSelect]![Text2] Long,
[Forms]![frmCustomerSelect]![Text4] Long;
SELECT tblRMA.Customer, tblRMA.RMA, tblRMA.SalesRep, tblRMA.[WO#-Line#],
tblRMA.[Date Notified], tblRMA.[Discrepant Qty], tblRMA.[U/M],
tblRMA.[Discrepancy Description], tblRMA.[Customer Expectation],
tblRMA.[Discrepancy Code], tblRMA.[Date Disposition Made],
tblRMA.[Disposition Code], tblRMA.[Credit Amount], tblRMA.[Raw Mat'l Cost],
tblRMA.[Labor Cost], tblRMA.[In / Out Frt Cost], tblRMA.[Misc Cost],
tblRMA.DateClosed, [Raw Mat'l Cost]+[Labor Cost]+[In / Out Frt Cost]+[Misc
Cost] AS [Total Cost], Year([Date Notified]) AS YearNum, Month([Date
Notified]) AS MonthNum
FROM tblRMA
WHERE (((tblRMA.Customer)=Forms!frmCustomerSelect!CustomerSelect) And
((Year([Date Notified]))=Forms!frmCustomerSelect!Text6) And ((Month([Date
Notified])) Between Forms!frmCustomerSelect!Text2 And
Forms!frmCustomerSelect!Text4))
ORDER BY Year([Date Notified]), Month([Date Notified]);
Right now I have a query that selects the starting month, ending month, and
year from a form. How would I be able to select the starting month & year and
the ending month & year? This could be very simple but for some reason I
can't figure it out. I've attached the SQL from my current query below;
PARAMETERS [Forms]![frmCustomerSelect]![Text2] Long,
[Forms]![frmCustomerSelect]![Text4] Long;
SELECT tblRMA.Customer, tblRMA.RMA, tblRMA.SalesRep, tblRMA.[WO#-Line#],
tblRMA.[Date Notified], tblRMA.[Discrepant Qty], tblRMA.[U/M],
tblRMA.[Discrepancy Description], tblRMA.[Customer Expectation],
tblRMA.[Discrepancy Code], tblRMA.[Date Disposition Made],
tblRMA.[Disposition Code], tblRMA.[Credit Amount], tblRMA.[Raw Mat'l Cost],
tblRMA.[Labor Cost], tblRMA.[In / Out Frt Cost], tblRMA.[Misc Cost],
tblRMA.DateClosed, [Raw Mat'l Cost]+[Labor Cost]+[In / Out Frt Cost]+[Misc
Cost] AS [Total Cost], Year([Date Notified]) AS YearNum, Month([Date
Notified]) AS MonthNum
FROM tblRMA
WHERE (((tblRMA.Customer)=Forms!frmCustomerSelect!CustomerSelect) And
((Year([Date Notified]))=Forms!frmCustomerSelect!Text6) And ((Month([Date
Notified])) Between Forms!frmCustomerSelect!Text2 And
Forms!frmCustomerSelect!Text4))
ORDER BY Year([Date Notified]), Month([Date Notified]);