Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How do I locate the position of character in a string in Access?

Posted on 2011-02-15
3
Medium Priority
?
944 Views
Last Modified: 2012-05-11
I have a string in a field: "MS Steven, Middletown, Chicago, US"

How do I detect the position of last occuring ","? <--that one behind Chicago?
I know Instr function, but how do i detect in a reverse order?
0
Comment
Question by:hkgal
  • 2
3 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 34898319
you will use
instrrev(str,"?")
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 total points
ID: 34898334

instrrev("MS Steven, Middletown, Chicago, US",",")
0
 

Author Closing Comment

by:hkgal
ID: 34898377
NICE
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
In a use case, a user needs to close an opened report by simply pressing the Escape (Esc) key. This can be done by adding macro code in Report_KeyPress or Report_KeyDown event.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question