Connecting Tech Pros Worldwide Help | Site Map

find method problem

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 14th, 2006, 10:45 AM
runner7@fastmail.fm
Guest
 
Posts: n/a
Default find method problem

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, 02:25 PM
kingston via AccessMonster.com
Guest
 
Posts: n/a
Default 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, 09:15 PM
runner7@fastmail.fm
Guest
 
Posts: n/a
Default 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.

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,840 network members.