Using an image to link to external files?

ChunkyChats

Registered User.
Local time
Today, 23:20
Joined
Jul 1, 2016
Messages
20
Hi,

I have a field of Links to employee files on our network. This field is stored with each employees FirstName, LastName....

On my form for Employee Input/amendment I would like to have an image of a file that users can simply click on to be taken to the file URL stored in the field.

Currently I have used a text box bound to the EmployeeFiles field, but it looks ugly and users don't need to see the details.

Can't figure this out for the life of me.

Ta for reading
 
If you just want an file icon you can find plenty of them just by googling "file icon". You can put that on your form as an image and use the on click event of the image to take the user to the URL.
 
Sneuberg, Many thanks. I have the image up but the problem is my lack of knowledge on how to use on click event. I'm not very good at VBA yet (But Learning).

I'm sure it's pretty simple? How do you link the onclick procedure to the url in the field?

Steve
 
Sorry I thought you had that part already in place. If the data in the textbox is a URL like http://www.access-programmers.co.uk/ the code could be simply

Application.FollowHyperlink Me.[The name of the textbox]

but I'm not sure what you mean by "the file URL stored in the field" when you also say "This field is stored with each employees FirstName, LastName...."

Please tell us a little more about the data that's presently on the form and what you mean by "be taken to the file URL stored in the field." Better yet zip your database, upload it, and tell us where this is.
 
Sneuberg,

Appreciate the offer: I have uploaded an example to Drop Box. here

h_ttps://w_w_w.dropbox.com/s/6ysjeyc2huan17c/LicenseDatabase1DraftEX1.zip?dl=0

You'll note On the frmEmployee_Input I have place a graphic of a file and alongside I added a text box linked to EmployeeFiles field in the Tbl 'Data transfer sheet' just to show you the link I would like for the graphic. Clearly the link is different for each employee record.

Employee Files field holds the links to the folder containing all of the info.

I hope thats clear?

Steve
 
sorry had to put the spaces in the URL as I haven't posted enough yet to be able to place links u[p. Although the rate I'm asking questions that shouldn't be a problem soon!!

Steve
 
I'm not sure as I don't know what these file are but try this.

  1. Open frmEmployee_Input in design view
  2. Right click on the folder image
  3. Click Build Event (It's on the top of the menu)
  4. Choose Code Builder in the Choose Builder dialog and click OK
  5. Add the following line of code

Code:
Application.FollowHyperlink Me.Text74

Exit the code area with Shift F7

I suggest giving your controls better names.
 
Many Thanks for looking. The control 'Text74' was an example to show where I was pulling the link from, sorry.

For info the link should open 'Documents' to a folder location that contains a repository of employee records held on a network drive. The Staff number Folderlink control also has the link address in it, but I was hoping to make it more intuitive for users by placing the link directly in the image.
 

Users who are viewing this thread

Back
Top Bottom