Using a hyperlink to run a sound file from a form

T

the_cat

I have a MS Access form that lists sound files & a text box that is a
hyperlink to the local address to run the file.
Is there a way of running the hyperlink with a command button
Any help would be gratefully received
 
D

Douglas J. Steele

You don't even need the hyperlink. Just use

Application.FollowHyperlink FullPathToFile
 
T

the_cat

I am confused, (I easily am) do you mean this has to be entered as an
event procedure?
 
D

Douglas J. Steele

Yes. That would be entered in the procedure for the Click event of the
command button.
 
T

the_cat

I must apologies but I have tried entering Application.FollowHyperlink
FullPathToFile on the event procedure but cannot get it to work.
 
D

Douglas J. Steele

You do realize, I hope, that "FullPathToFile" stands for a variable that
holds the full path to the sound file you're trying to play?

What's the actual code you're using?
 
T

the_cat

I'm sorry but I am a relative beginner & I do not understand code, at
the moment I have a table field that is a hyperlink & I have put the
local path to each sound file in that field.
So on the form it appears like a text box & when you click on it it
opens the file.
I was hoping to make it look a lot tidier by doing away with the ugly
looking text box & using a command button.
Sorry to be a pain
 
Top