dbTalk Databases Forums  

Access 2003

comp.databases.ms-access comp.databases.ms-access


Discuss Access 2003 in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Barry
 
Posts: n/a

Default Access 2003 - 03-09-2011 , 11:34 AM






I want to within a field on a table find a char and its location. Then
I can move left or right and collect the data. This can easily be done
in Excel - in Access Like will find the record but not the position.
Any ideas folks.

Reply With Quote
  #2  
Old   
Salad
 
Posts: n/a

Default Re: Access 2003 - 03-09-2011 , 12:45 PM






Barry wrote:
Quote:
I want to within a field on a table find a char and its location. Then
I can move left or right and collect the data. This can easily be done
in Excel - in Access Like will find the record but not the position.
Any ideas folks.
Would Instr() help?

? instr("Barry","r") 'forward
3
? instrrev("Barry","r") 'backward
4

Reply With Quote
  #3  
Old   
Phil
 
Posts: n/a

Default Re: Access 2003 - 03-09-2011 , 01:58 PM



On 09/03/2011 18:45:04, Salad wrote:
Quote:
Barry wrote:
I want to within a field on a table find a char and its location. Then
I can move left or right and collect the data. This can easily be done
in Excel - in Access Like will find the record but not the position.
Any ideas folks.

Would Instr() help?

?
3 i
? instrrev("Barry","r") 'backward
4

Don't forget this will only find the first instance of the letter eithr from
the back or front. dim X as integer
X = instr("Barry","r") finds the first occurrence
X = instr(X+1, "Barry","r") finds the next occurrence
Phil

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.