Open files from Table using Combo Box

goldriverdancer

Registered User.
Local time
Tomorrow, 07:39
Joined
Jan 4, 2010
Messages
13
Hi,

I have a main form where I would like to put a combo box that displays the file names for a particular record, and when the user clicks on a file name, that file will open. Based on suggestions on the net, I've created another table with a primary key, the file name, and the file path.

So far, I've tried to open the files by setting the row source of the combo box to the field [File Name] and the control source to the field [File Path], then using Application.FollowHyperlink "[Table1]![File Path]" on the AfterUpdate event of the combo box. This doesn't work though.

Can anyone point out what I'm doing wrong?

Thank you.


Stef
 
Presuming the bound column of the combo is the path, it would be:

Application.FollowHyperlink Me.ComboName
 
Thanks heaps. My problem was that the bound property was set to the wrong column AND of course the wrong code for the followhyperlink method. Thank you very much!

Stef
 
No problem Stef; glad we got it sorted out.
 
Hey, need just a bit more help to finish this thing up. Everything is working except that I want to display files for a particular record only. Now, when I click the combo box, it displays all the files in my table called Well Files.

I have the fields: AutoID, Well name, Field name, and Field Path. I have a one to many relationship for the Well name field from the main table to my "Well Files" table. I thought that would be enough to limit the combo box to display only the files for a particular well but it doesn't. Any ideas?

Many thanks,

Stef
 

Users who are viewing this thread

Back
Top Bottom