Change the begining of a record to read something else

B

BZeyger

I have an access VBA Database that provides users information. One bit of
information is the file location. On my computer the location name would be
Z:/USER_ABC/abc.PDF
That is not the location on everone PC.

I would like to change the locations to begin with this instead
\\ServerA\ABCDEF\USER_ABC/

I would like this validation to occur ever time the location is entered in
the form

What would be the code to use to make this happen?
 
D

Danny J. Lesandrini

You can use an Update Query, or you can use Find/Replace.

If there are only a few records, say less than 1000, just open the table and
press Ctl+H to bring up the replace dialog.

Set it to look at the beginning of the record only and enter the find and
replace text. Press Replace All and away you go.

The Update sql would look like this ...

UPDATE tblJunk SET [fldJunk]= Replace([fldJunk], "Z:/User/","\\serverA\")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top