Re: Problem with search string using 'AND'
From: John Spencer (MVP) (spencer4_at_comcast.net)
Date: 05/24/04
- Next message: Wayne Morgan: "Re: Maximizing"
- Previous message: Wayne Morgan: "Re: Cannot unset password in Access2003"
- In reply to: Tom Glasser: "Problem with search string using 'AND'"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 24 May 2004 15:51:19 -0400
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
- Next message: Wayne Morgan: "Re: Maximizing"
- Previous message: Wayne Morgan: "Re: Cannot unset password in Access2003"
- In reply to: Tom Glasser: "Problem with search string using 'AND'"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|