Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

InStrRev Function Does Not Work

Status
Not open for further replies.

GGleason

Technical User
Mar 22, 2001
321
US
I am using Access 2000 and wrote a query where I used the InStrRev function and it does not work. I get a message that says "Undefined function 'InStrRev' in expression. (3085)" but when I try using the function in the immediate window it works.

What's going on?

TIA,
GGleason
 
Would you be so kind as to post the InsStrRev function that you are using?

Thanks,

Steve
 
Steve,

It is the standard VBA function that is similar to the "InStr" function excepts it reports the value reading from the right.

GGleason
 
There are a number of intrinsic function that although defined in VBA are not accessible within queries.

Easiest solution is write a wrapper around the function, place the wrapper as a public function inside a module, and from the query, call the wrapper.

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
CajunCenturion,

I did what you suggested before I got your reply and that was my workaround.

Thanks,
GGleason
 
GGleason - I am running into the same problem. Could you give an example of using a wrapper? Thanks.
 
evalesthy,

It has been a while and I don't have the code anymore, but you place the function in a module that mimic the arguments of the InStrRev in your new public function and you call the public function instead of InStrRev and all should be well.

hth,
GGleason
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top