martykozman
09-17-2000, 03:43 PM
I have users that want to be able to click on a list box entry and open their Excel spreadsheets. Can you tell me how to approach this, or if there is a better way to accomplish this?
|
View Full Version : Loading a Listbox with files from a directory folder martykozman 09-17-2000, 03:43 PM I have users that want to be able to click on a list box entry and open their Excel spreadsheets. Can you tell me how to approach this, or if there is a better way to accomplish this? accesswatch 09-18-2000, 04:00 AM Look up help on Hyperlinks. Hyperlinks will allow you not only to open an Excel spreadsheet but will also allow you to open the spread sheet and go to a particular cell. Store the Hyperlinks in a table with field type Hyperlink. Display the table to the user rather than a list box or use a listbox to select the spreadsheet and then populate a button control with the hyperlink address from vba. This background may help you to achieve what you want to do. Once you know the foillowing it becomes relativly easy to manipulate Hyperlinks in code. Internal to Access a Hyperlink field is actualy just a special type of memo field. Internal code within access tells Access to treat this special 'memo' field differently to normal memo fields. You can test this by making a table with some hyperlinks records in it. Display the table to show the hyperlinks Modify the table so that the filed type hyperlink is now field type 'memo' display the table again and view the full text of the field. e.g Create a hyperlink with the following value Q100025#http://support.microsoft.com/support/kb/articles/Q100/0/25.asp View the table and you will see the hyperlink displayed as: Q100025 If you view the hyperlink using a right click the hyperlink will show only: http://support.microsoft.com/support/kb/articles/Q100/0/25.asp i.e it does not show the label part of the link If you now change the field type from hyperlink to 'memo'and then view it again it will display as text Q100025#http://support.microsoft.com/support/kb/articles/Q100/0/25.asp Change it back to a hyperlink and redisplay it and again it will show only the label Q100025 One other point is that you do not have to include a label. Applying this to you case all you have to do is insert your records using mailto instead of http Knowing that you can use the label will aslo let you create a mailto which displays as an 'alias' e.g mailto://jim@ourmail.com could be created as jim#mailto://jim@ourmail.com As you can see it is very easy, with this knowledge, to create some sophisticated systems very easily (instant Access Guru Status) Hope this helps Regards Trevor from www.accesswatch.co.uk (http://www.accesswatch.co.uk) [This message has been edited by accesswatch (edited 09-18-2000).] |