When I create a query with the same SQL in the Access database window, I get the full set of ten records.
I have no compile issues. I use the two parameters as 'interactive text' rather than true parameters. I do not get the Error 3061 b.s.
Expand|Select|Wrap|Line Numbers
- SampQry = "SELECT LabSample.ClientID, LabSample.TcgProjectID, LabSample.TcgSdgID, LabSample.Fraction, LabSample.LabSampleID FROM LabSample "
- SampQry = SampQry & "WHERE (((LabSample.TcgSdgID)='" & [Forms]![SDG_BuildAnalyteList]![ActiveSDG] & "') AND ((LabSample.Fraction)='" & [Forms]![SDG_BuildAnalyteList]![PikdFrac] & "'));"
- Set NewSampSet = wkbase.OpenRecordset(SampQry, dbOpenDynaset)
SELECT LabSample.ClientID, LabSample.TcgProjectID, LabSample.TcgSdgID, LabSample.Fraction, LabSample.LabSampleID
FROM LabSample
WHERE (((LabSample.TcgSdgID)=[Forms]![SDG_BuildAnalyteList]![ActiveSDG]) AND ((LabSample.Fraction)=[Forms]![SDG_BuildAnalyteList]![PikdFrac]));
this query gives me the 10 records I seek
In the code, right after the NewSampSet, I have a second recordset defined by a similar query string using the same "text" parameters (w/ 25 records resulting) and have no issue with that one.
I'm stumped. Any help is appreciated. HELP!! :0)