File path in a hyperlink field

R

Ricoy-Chicago

Using Access XP.
I have a form with a hyperlink field. The default value for the filed is the
path where the files are at (X:\Marketing\Images) this is a drive in the
server where the marketing people put different images associated with a
record. No problem opening the image file or hyperlinking.

My question is: Can the user type only the file name, without
X:\Marketing\Images showing on the screen? For example: they type: "Logo.bmp"
and the hyperlink field actually contains: X:\Marketing\Images\Logo.bmp.
Users have problems entering the file name only, they tend to delete the
existing path (the default value) and they have to retype everything.

Any suggestions are welcome.... Thanks in advance.
 
W

Wayne-I-M

You could load the path - other than the last "bit" and then concenate the
string with an AfterUpdate event
 
D

Daniel Pineault

Yes it can be done. You can allow you user's to only enter the file name and
then code it to add the path when the try to open the file.

For instance, if you have a button, which opens the file, next to the
filename textbox, you could code the button like

Application.FollowHyperlink "X:\Marketing\Images\" & Me.FileName

Where Filename is the name of the control on your form with the filename to
be opened.

This said, why not eliminate this issues alltogether by using a file dialog
to allow the user to select the file and have it populate the file control
value, path and all? If this could be of interest, take a look at

http://www.mvps.org/access/api/api0001.htm
 

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