File path in a hyperlink field

  • Follow


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.
0
Reply Utf 1/15/2008 6:35:01 PM

You could load the path - other than the last "bit" and then concenate the 
string with an AfterUpdate event
-- 
Wayne
Manchester, England.



"Ricoy-Chicago" wrote:

> 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.
0
Reply Utf 1/15/2008 9:57:00 PM


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
-- 
Hope this helps,

Daniel Pineault
If this post was helpful, please rate it by using the vote buttons.



"Ricoy-Chicago" wrote:

> 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.
0
Reply Utf 1/15/2008 9:59:02 PM

2 Replies
965 Views

(page loaded in 0.042 seconds)

Similiar Articles:
















7/19/2012 3:37:09 PM


Reply: