File extension and hyperlinks

chris01252

Registered User.
Local time
Yesterday, 23:00
Joined
Feb 27, 2007
Messages
43
Hi Everyone

I have just solved one problem concerning creating hyperlinks based on values in other fields: See Previous Thread

but now I have another, the hyperlink I have created links to a document, while for the majority of time it is a word document it is not always, occasionally .xls or .pdf

So I need a way of building into the hyperlink code the file extension, my thoughts are it would involve check boxes and if statements (one check box for each) but I am unsure of how to do this, can anyone help?


My code is currently:

Private Sub H_Enter()
Form!H = "hyperlink#C:\Documents and Settings\cew1\My Documents\WORK\Specs\" & Form!S & Form!PC & ".doc#"
End Sub
 
file extension and hyperlinks

g'day,

I would use a select case to do that: eg.

select case Me!FieldName

case "doc"

your code finishing with .doc

case "jpeg"

your code finishing with .jpeg

etc

Dave
 
Are you storing the EXT with the doc name if so just tag it on to the end.
 

Users who are viewing this thread

Back
Top Bottom