Listing Files from MS-Access Forms

  ElephantRhino 14:03 05 Nov 04
Locked

I want to attach documents to records in an MS-Access db. The easiest way I thought to do this is by creating a field of type Hyperlink and from the data-entry form, adding a combo field which listed the files in the appropriate folder (they'll be same file-type in a single folder) which I could later open by clicking on the field entry. How do I set this up or is there a better way?

  JaßîsFaß ˜ 14:10 05 Nov 04

In MS Access open your help and type 'field to store OLE objects' in as the question and follow guidance.

  Rand Al Thor 14:22 05 Nov 04

Yes, you can do it that way. I would create a new table. HyperlinkID(Primary Key) and HyperLinkToDocuments, Data type set as Hyperlink. It is just a simple case of entering the path name and file name as a hyperlink in the table. Your combobox can use this table as the Control Source. Alternatively, you could use an API call to search for a file. Have a look at this site for example code.

click here

Incidentally, this site is great Access resource.

David

  ElephantRhino 16:24 05 Nov 04

Where would I add the code?

  ElephantRhino 16:40 05 Nov 04

JaßîsFaß - using an OLE object as outlined will work but I was hoping to speed things up by having one click and seeing the list of files (i.e. effectively using a defined *.filetype as my value list) and therefore avoid the many clicks otherwise required.

  JaßîsFaß ˜ 16:57 05 Nov 04

If you go for Rand Al Thor's suggestion and create a table of all hyperlinks to full set of documents, you can then use a look up wizard to link this through to any other data tables. Then on forms by using a dropdown menu field be able to select the document from the drop down.

  JaßîsFaß ˜ 18:37 30 Nov 04

Did you get this working? I may have a similar for hyperlinks in Access.

  ElephantRhino 13:00 02 Dec 04

Not as neatly as I wanted - I couldn't get my head around the code so simply created a hyperlink field in the table, added to the form and right-click, Hyperlink, Edit and browse to find the doc. Come back DataEase, all is forgiven!!

  JaßîsFaß ˜ 13:08 02 Dec 04

Did you try using a separate table of just a hyperlink field, and hyperlink name. Give each record a different name, then set its associated hyperlink field to the separate documents. You can then use this table as a look up entry in any other tables.

  JaßîsFaß ˜ 20:07 19 Dec 04

bump - see if any other suggestions

  JaßîsFaß ˜ 10:31 30 Dec 04

^

This thread is now locked and can not be replied to.

How to get Windows 10 for free | How to install Windows 10: There is still a way to avoid paying…

1995-2015: How technology has changed the world in 20 years

Alex Chinneck’s giant ice cube Christmas tree at Kings Cross

Apple rumours & predictions 2017: The iPhone 8, new iPads, and everything else you should expect fr7…