|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I would like to add links to PDFs that are on my network and I have never used a hyperlink field.
The PDF name is the same as a field in the DB (permit number) so is it possible to make the default value setting set to the path with the value of that field? For example: Default value: P:\NetworkDrivePath\[permit number] Thanks David |
|
#2
|
||||
|
||||
|
instead of adding links, I would just use a form to display a button on the record and then use this code:
Code:
Dim strPath As String strPath = "P:\NetworkDrivePath\" & Me![permit number] FollowHyperlink strPath You could also have it in a double click event for a field.
__________________
Bob Larson Former Access MVP 2008-2009, 2009-2010 Free Access Samples and Tutorials: http://www.btabdevelopment.com |
|
#3
|
|||
|
|||
|
Bob:
Entered text below and received a Run-time error 2465 - cannot find the field Permit Number - is this because there is a space in the field name? Code entered: Dim strPath As String strPath = "O:\TRAFFIC\TRAFFIC\Permits\SpecialHaulingPermitDat abase" & Me![Permit Number] FollowHyperlink strPath Thanks David |
|
#4
|
||||
|
||||
|
If you are looking for a control you should use the DOT and not the Bang.
& Me.[Permit Number] If there is a text box on the form named Permit Number |
|
#5
|
||||
|
||||
|
And you might need a backslash here too:
strPath = "O:\TRAFFIC\TRAFFIC\Permits\SpecialHaulingPermitDat abase\" & Me.[Permit Number] |
|
#6
|
|||
|
|||
|
Quote:
Now I get a run time error 490 |
|
#7
|
||||
|
||||
|
Quote:
What's the full text of the error message? |
|
#8
|
|||
|
|||
|
Run time error '490':
Cannot open teh specified file. |
|
#9
|
||||
|
||||
|
Quote:
Ahh, perhaps we need to modify to this: strPath = "O:\TRAFFIC\TRAFFIC\Permits\SpecialHaulingPermitDat abase\" & Me.[Permit Number] & ".pdf" |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft Access Development > Hyperlink Field |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|