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

How select a part of a string ? 1

Status
Not open for further replies.

Schaap

Technical User
Jul 6, 2004
54
NL
Hi,

I'm using an hyperlink in my database that I display on a form. Because of the lenght of the hyperlink a wanna use only the last part to display on my form. The first part of the string has always the same lenght(68), the part that I wanna use doesn't.
The code I tried :

Index = IndexNumber
Set Db = CurrentDb()
Set Rs = Db.OpenRecordset("SELECT Offer FROM tab WHERE Indexnumber=" & Index)
StrLink = Rs!Offer
Me.OfferLink = StrLink And Left(StrLink, 68)
Rs.Close
Set Rs = Nothing
Ofcourse doesn't work !!!
Does someone have a working solution, please let me know !?!
 
Not sure if I have properly understood but try:

Me.OfferLink = Mid(StrLink, 69)
 
I think you need:

right(StrLink, len(strLink) - 69)

--------------------
Procrastinate Now!
 
Would try

Me.OfferLink = StrLink & mid(StrLink, 69)

should work if I have understood what u wanted correctly
 
Thanx lupin

Me.OfferLink = Mid(StrLink, 69

that's the wright one
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top