Link to folder from Access form

RichP

Board Regular
Joined
Jul 31, 2002
Messages
63
Hi there,
I'm fairly new to access, and can't work out how to make something work, any help gratefully received.

I have a database of projects (listing dates, teams, etc), and in a separate folder (c:\Project_Files) I keep a folder for each project (c:\Project_Files\Project A, Project B, etc) with all the documentation related to it (name of folder = name of project).

I use a form to review the basic information on each project, but I would like to add a button that will open up the folder for the project that I am looking at (eg an open command, or a hyperlink). I know I can add a label, and put the address into its properties, but since the address is different for each entry, how can I make it open the folder for the project that I am looking at (something like c:\Project_Files\{field project name})?

Many thanks,
RichP
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
You can do this using a short VBA code

Insert new Command Button on form, in design view open its properties and go to Event>On Click>[...] >Code Builder and insert code below to make it look like:

Private Sub NameOfYourCommandButton_Click()

NameOfYourCommandButton.HyperlinkAddress = "c:\Project_Files\" & NameOfControlWhichDisplaysProjectName.Value

End Sub


HTH
 
Upvote 0

Forum statistics

Threads
1,221,607
Messages
6,160,787
Members
451,671
Latest member
kkeller10

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top