Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Equivalent of VFP AT()?
Message
From
03/05/2002 13:18:56
 
 
To
02/05/2002 15:01:52
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00652048
Message ID:
00652507
Views:
21
>>I need to get the location of the nth occurence of a string within another string (from the string end). This is simple in VFP - use RAT(). Is there a VB equivalent?
>
>Isn't there a Instr() function? See also Mid().

An interesting aside - I'm actually working in Access so it's VBA, not VB. It turns out that InStrRev() is not available in VBA. http://support.microsoft.com/default.aspx?scid=kb;EN-US;q190274

I was trying to use it but I was getting results that were plainly wrong. It turns out that VBA does not throw an error when you try to use it - it simply substitutes InStr() instead! A rather nasty *gotcha* for the unwary.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Reply
Map
View

Click here to load this message in the networking platform