By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,456 Members | 1,952 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,456 IT Pros & Developers. It's quick & easy.

find method problem

P: 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?

Nov 14 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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.

ru*****@fastmail.fm wrote:
>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

Nov 14 '06 #2

P: n/a
kingston via AccessMonster.com wrote:
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.

Nov 15 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.