What Access Version?
Using ADO or DAO recordset?
If you are using ADO and Find against a recordset, I believe (could be wrong)
that you are limited to only one criteria.
Tom Glasser wrote:
>
> Hello All,
>
> I'm constructing a search string and then using the 'Find' method for a recordset.
> I want to check two fields and so I'm using an "AND" construct. But I keep getiing
> the following error:
>
> "Arguments are of the wrong type, are out of range, or are in conflict with one another."
>
> If I test using each field separately, I get no error. See examples below:
>
> strWhere = "[HIST_JRNRNTRY] = " & rsSBMPRDists!JRNENTRY (OK)
>
> strWhere = "[HIST_ACTINDX] = " & rsSBMPRDists!ACTINDX (OK)
>
> strWhere = "[HIST_JRNENTRY] = " & rsSBMPRDists!JRNENTRY & " AND [HIST_ACTINDX] = " & rsSBMPRDists!ACTINDX (Error)
>
> The fields involved are defined as Long Integer. Is there something wrong with the syntax of the third
> line that uses AND ?
>
> Flustered,
> Tom
|