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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to Trim unwanted characters 1

Status
Not open for further replies.
Jul 19, 2001
8
0
0
US
I'm trying to cut off the beginning portion of a string. Here's where things get fuzzy. The beginning portion is seperated between < and >. The length of this portion varies so I cannot do a &quot;Len(blah)-5&quot; thing.

i.e.
1.) <----blah, blah----> Real Data
2.) <--------BLAH, BLAH-----> Real Data

Now I know in Excel there is a FindFirst command that will find the first instance of a character. After that, you can delete all characters before that certain character (in this instance &quot;>&quot;). Is there anything in Access that is similar? I've seen references to an AT() function but I can't find anything about it.

Thanks,
PresleyKSU
 
Look at the InStr function. You probably want something like:
Right([fieldname], Len([fieldname])-InStr(&quot;>&quot;,[fieldname]))

(check all syntax - I'm a little out of practice)
 
Very Close.

Right([fieldname], Len([fieldname])-InStr(1,[fieldname],&quot;>&quot;,0))



Thanks, tempclerk. Much appreciated.

PresleyKSU
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top