Access 2007 paste into form and create hyperlink

Posted on 2010-01-06
Last Modified: 2013-11-28
I am trying to find a way to do the following:
I want a user to be able to either paste or drag and drop a document (pdf, jpg, doc, xls, etc)
from outside of Access to a textbox or similar control. On this event, Access should do the following:
-Create a new folder for the company name in the dbase parent folder if one does not exist.
-Create a new folder for the form number (unique value) if one does not exist.
-Copy the document from its location to the subfolder if it exists or after the subfolder is created.
-Ask the user what filename they want to assign to the copied document
-Save the doc as that filename
-create a hyperlink in the access form (again I see this as a textbox) with the name and a link to the saved document.

The user should be able to copy as many documents (within reason) into the form as they wish.
The names of the hyperlinks should appear in the textbox, seperated by commas, as in:
document1.doc, document2.pdf, document3.txt etc...
And finally, the user should be able to open these documents by clicking on the hyperlink.

Whew! I know how to accomplish the majority of the file manipulation via VBA but the Access functionality is new to me. I have included the entire idea for completeness and any help is greatly appreciated!
Question by:JP_TechGroup
    LVL 30

    Expert Comment

    This question is a complete project!
    Don't expect any one to visit it. You have to do some homework and ask specific questions about issues you face during the process.
    Each question should address one issue.
    LVL 44

    Accepted Solution

    Why not leave the document where it is. Create a table with the field DocHyperlinks (type Hyperlink),  bind the form to the table, right click on the hyperlink control on the form, and use the wizard to navigate to the document, and provide the name you want to see in the control on the form.  I sailed around the world, have a few thousand pictures in several directories - that is how I access them from my form.  Of course, I have another field describing the segment of the trip,so that I can scroll to the segment of interest,  see all the linked jpg's, double click on any one, and up pops the Windows Fax and Picture Viewer.  I don't have the trip data any where near the location of the mdb.

    Author Closing Comment

    Close enough. Thanks for reading the WHOLE post!
    LVL 44

    Expert Comment

    Thanks, glad to help.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
    A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
    With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
    In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now