Not really.
Is the form open when you try to run the query?
Can you post the SQL text of your query?
At the beginning of the SQL statement you should have something like:
Parameters [Forms]![frmCustomerSelect]![Text2] Long,
[Forms]![frmCustomerSelect]![Text4] Long;
SELECT ...
FROM ...
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]);
If this prompts you for
[Forms]![frmCustomerSelect]![Text2] and
[Forms]![frmCustomerSelect]![Text4]
then I would suspect that you either have the names of the controls
incorrect or the form is not open.
If this runs without the prompts, but gives you incorrect or no data, then I
would start looking at the data.
> That didn't work. It still did the same thing. Any other ideas?
>
[quoted text clipped - 38 lines]
>> > > > [Forms]![frmCustomerSelect]![Text4]))
>> > > > ORDER BY Year([Date Notified]), Month([Date Notified]);
Yes the form is opened when I run the query. The form is what triggers the
query. Here is the SQL text of the query;
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]);
> Not really.
> Is the form open when you try to run the query?
[quoted text clipped - 63 lines]
> >> > > > [Forms]![frmCustomerSelect]![Text4]))
> >> > > > ORDER BY Year([Date Notified]), Month([Date Notified]);
John Spencer - 23 Nov 2005 17:30 GMT
The SQL you posted has none of the modifications that have been suggested to
you. The following should work - have you tried this variation? IF so,
what happens? Error message, no records returned, wrong records returned,
parameter box requesting input?
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]);
> Yes the form is opened when I run the query. The form is what triggers the
> query. Here is the SQL text of the query;
[quoted text clipped - 90 lines]
>> >> > > > [Forms]![frmCustomerSelect]![Text4]))
>> >> > > > ORDER BY Year([Date Notified]), Month([Date Notified]);
Secret Squirrel - 23 Nov 2005 17:49 GMT
I wanted to show you the original text of the SQL. I did put the code in the
way you wrote it and it works fine now. No problems whatsoever. Thank you
very much for your help John! Happy Turkey Day!
> The SQL you posted has none of the modifications that have been suggested to
> you. The following should work - have you tried this variation? IF so,
[quoted text clipped - 113 lines]
> >> >> > > > [Forms]![frmCustomerSelect]![Text4]))
> >> >> > > > ORDER BY Year([Date Notified]), Month([Date Notified]);