Discussion Locked

Link button to different spreadsheets

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

In Access 97, I would like to have a command button on a form that will link to an Excel spreadsheet. The problem is, I want it to link to different spreadsheets, depending on the value of the data in the form.

For example if the value of txtTexton the form is = "1.1", then I want the button to link to BudgetJan.XLS; if txtText is "2.1", then I want it to link to BudgetFeb.XLS. How do I change the hyperlink path of the command button based on a value in the form?

Any help is always appreciated!

Thanks,

Elwood

3 replies

by stephen.berry

After creating your initial button, edit the code directly to include if/then/else statements for each option. You can also include the full button code and change the name of the button for each option to help you visually test your code.

This discussion is closed to new replies.