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

Find Function in Excel not in Access

Status
Not open for further replies.

christopher007

Instructor
Nov 14, 2003
29
0
0
GB
Does anyone know, how you can search for a character in a string like the Find function in Excel. I have a field Full Name that is first name and surname together; I need to strip out the first letter of the surname to sort on.
 
Ok, are you talking substringing (stripping out n letters) or FINDING a character IN a string? Your post is unclear.

Access can do either:

Left({somestring},1) - gives you the first character of a string.

Instr({somestring}, {character}) returns the postion of {character} in the string {string}

Instr("Bellicose", "c") returns 6

There is also a seldom used REVSTR() function to return the position of {character} in {string}, starting from the END of the string and working LEFTwards.

Hope this is what you're looking for.. ??

Jim


Don't be sexist - Broads hate that.
Another free Access forum:
More Access help stuff at
 
Instr({somestring}, {character}) returns the postion of {character} in the string {string}

Is exactly what i was looking for so will give it a go, i couldnt find this in access anywaere builder help ect

Much appricated Jim
Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top