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!

Need To Remove Characters after "?" in URL 1

Status
Not open for further replies.

JoeF

Technical User
Nov 30, 2000
54
0
0
US
I have imported a list of urls with several other fields i need to analyze, but I need to cut the characters after the "?" out of the URL field.

I was going to use a replace() formula to remove everything after the question mark, but i have no way of telling the formula what character to start the replace. If Access had a find() or a search() formula like excel, i could know the number of characters in the string to start the replace and then remove them. Is there a similar find or search function in Access?
 
Access does have a find, it's Instr() which returns the position of one string within another.
Code:
Instr("Need to Remove","re") = 9
I expect this is enough info to get you going.

Duane
Hook'D on Access
MS Access MVP
 
Worked like a charm. Thanks!
 
Worked like a charm
Even with URL without "?" ?
You may consider the Split function:
Code:
strResult = Split(strURL, "?")(0)

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top