Connecting Tech Pros Worldwide Help | Site Map

find method problem

  #1  
Old November 14th, 2006, 11:45 AM
runner7@fastmail.fm
Guest
 
Posts: n/a
I have a recordset find method that works with a simple expression such
as:

"ProdID=100"

but when I use

"ProdID=" & objR![Field]

I keep getting an error about types mismatched or arguments out of
range or incompatible or something like that.

The 2 fields are of the same type and size. As far as I know, both
recordsets have been properly opened. Can anyone give me a clue as to
what is wrong?

  #2  
Old November 14th, 2006, 03:25 PM
kingston via AccessMonster.com
Guest
 
Posts: n/a

re: find method problem


Is objR![Field] a numeric data type? If not, you'll have to use:
"ProdID='" & objR![Field] & "'"
Use a message box to display objR![Field] right before you assign it to see
if there even is a value while you debug this.

runner7@fastmail.fm wrote:
Quote:
>I have a recordset find method that works with a simple expression such
>as:
>
>"ProdID=100"
>
>but when I use
>
>"ProdID=" & objR![Field]
>
>I keep getting an error about types mismatched or arguments out of
>range or incompatible or something like that.
>
>The 2 fields are of the same type and size. As far as I know, both
>recordsets have been properly opened. Can anyone give me a clue as to
>what is wrong?
--
Message posted via http://www.accessmonster.com

  #3  
Old November 15th, 2006, 10:15 PM
runner7@fastmail.fm
Guest
 
Posts: n/a

re: find method problem


kingston via AccessMonster.com wrote:
Quote:
Is objR![Field] a numeric data type? If not, you'll have to use:
"ProdID='" & objR![Field] & "'"
Thanks so much. Adding those single quotes solved the problem.

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Shared Method Problem With "Global" Storage eBob.com answers 11 October 20th, 2007 04:15 PM
Rows.Find () Method + Windows 98?? thomaz answers 1 November 16th, 2005 11:31 PM
DataRowCollection.Find Method Marc Pelletier answers 4 November 16th, 2005 06:17 PM
MS XML ADO "Fiind" method problem datactrl answers 2 July 23rd, 2005 02:32 PM