PC Review


Reply
Thread Tools Rate Thread

Re: Problem with search string using 'AND'

 
 
John Spencer (MVP)
Guest
Posts: n/a
 
      24th May 2004
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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
search for string of contacts by a string of email addresses Kerm Rudgeon Microsoft Outlook Contacts 2 21st Oct 2008 08:51 PM
string/regex: extracting the context of a string match around the found search term? Microsoft C# .NET 3 5th Jul 2007 03:55 PM
to search for a string and affect data if it finds the string? =?Utf-8?B?U2h3YW1hbg==?= Microsoft Excel Worksheet Functions 1 11th Jan 2006 01:56 AM
search a string withing a string : find / search hangs itarnak Microsoft Excel Programming 4 24th Oct 2005 04:19 PM
Re: Problem with search string using 'AND' Allen Browne Microsoft Access VBA Modules 0 24th May 2004 05:25 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:46 PM.