Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I follow a hyperlink in combo box from user's choice?

Status
Not open for further replies.

liam147

Technical User
Jul 14, 2003
5
IE
Hello,
I am making a database for exam papers. I have a form with 5 synchronised combo boxes(faculty, year, subject, etc). The last one asks the user to choose which paper they want and relates to a specific record in my papers_table. I want the user to be able to click on a button and open the file which they have chosen.
In my papers_table I have a hyperlink field and I have this hyperlink field as the bound field in the combo box. I cannot seem to correctly link the On_Click Event of the command button to the choice made in the last combo box.
Any help would be greatly appreciated.
Thanks,
Liam.
 
In the OnClick event of the command button, set the hyperlink address of the command button to the value of the combo box. For Example,

cmdButton.HyperlinkAddress = cboBox.Column(0)
 
Thanks for your reply.

I had been trying it a fairly similar way and when I tried what you suggested I came up against the same problem:

When I click on the command button an error message comes up to say 'MS Access can't follow the hyperlink to "C:/Exam_Papers/English/Paper1.doc"'.

It seems to be reading the addresses correctly from the combo box but for some reason can't follow the links. There's nothing wrong with the links themselves as they work fine from the table that they are stored in.
Any ideas??
Liam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top