remove the last character of a string in a hyperlink field

jom1918

Registered User.
Local time
Today, 19:06
Joined
Apr 26, 2011
Messages
30
I am a novice and learning update queries for a document register I have at work.

Can someone tell me how to update the records in a hyperlink field to remove the last character ONLY.

I imported data from another source and the hyperlink has an extra "\" at the end of each record that I need to get rid of.

Example record: Q:\forms\qsf100\

I need the record to be modified to: Q:\forms\qsf100

It is probably really easy, so I apologise in advance for being ignorant
 
You can use the Mid() function to remove the last char..

Dim str As String
str = " Q:\forms\qsf100\"
str=Mid(str, 1, (Len(str) - 1)) 'This will return Q:\forms\qsf100

Then you can use this str in your update statement. Hope this helps.
 
Thanks for that,but I am not sure that will work for me.

I have many different location paths to change. I have over 700 entries with documetns in varying locations. The only hing in common is that they all have the extra unnecessary "\" as the last character in the doc location field for every record in the table.

eg: Q:\forms\QSF100, P:\wwwroot\_webdocs\forms\QSF100
 
You can use an update query to update all the pre existing records..
 
Well, you can also use Left() function..

Dim str As String
str = " Q:\forms\qsf100\"
str=Left(str,(Len(str) - 1)) 'This will return Q:\forms\qsf100

As pointed out by Brianwarnock that is also another approach.. Just another way to solve your problem.. Thanks for that Brian.. I should have used that earlier.. :D
 

Users who are viewing this thread

Back
Top Bottom