Re: Problem with search string using 'AND'

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: John Spencer (MVP) (spencer4_at_comcast.net)
Date: 05/24/04


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



Relevant Pages

  • Re: Is ADO Dead (3)?
    ... The Design of ADO ... ADO uses a single object, the Recordset, as a common representation for ... a forward-only stream of results from a database, ... where data is updated at the data source or cached locally as with the ...
    (comp.databases.ms-access)
  • Re: Is ADO Dead (3)?
    ... The Design of ADO ... ADO uses a single object, the Recordset, as a common representation for ... a forward-only stream of results from a database, ... where data is updated at the data source or cached locally as with the ...
    (comp.databases.ms-access)
  • Re: Is ADO Dead (3)?
    ... The Design of ADO ... ADO uses a single object, the Recordset, as a common representation for ... a forward-only stream of results from a database, ... where data is updated at the data source or cached locally as with the ...
    (comp.databases.ms-access)
  • Re: DAO to ADO Recordset Options
    ... DAO was really fast when dealing with Access data (faster than ADO) but was ... Recordset. ... For client-sided cursors, there is only Static cursor type regardless as ... determines how often data is fetched from the server. ...
    (microsoft.public.data.ado)
  • Re: Is ADO Dead (3)?
    ... The Design of ADO ... ADO uses a single object, the Recordset, as a common representation for ... a forward-only stream of results from a database, ... where data is updated at the data source or cached locally as with the ...
    (comp.databases.ms-access)