Import file from form to director / associate path to record

dave2006

New Member
Joined
May 19, 2006
Messages
8
I have looked everywhere on the internet for this answer, I hope you can help.

What I want to do...
I want to allow a user to open a form containing record information, browse and select a file from their local computer, then upload the file to a directory where the Access Database is on the network server. The path of the uploaded/stored file needs to be stored in the record. The uploaded/stored file will be used again for download from another form which includes the record information and the ability to download the file back to a users computer.

The table name is "data_table"
The upload form is called "upload_form"
The download form is called "download_form"
The directory to store the files is " T:\files "

Thus far, I have created the table (data_table) to include the field name "file" and both forms that retrieve and display the selected record.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Hi Dave,

you will need to store the files in OLE fields in Access -- but watch out for database bloat! Your DB can become very large, very fast.

Anyway, here is a code-based method for pulling files into Access. You should be able to adapt it.

Denis
 
Upvote 0
Store path to uploaded file.

This is what I have found however I do not want to show the file since some of the files are images and some are not. What ever the type file (only one per record) the path needs to be attached to the record for later download from another user. I only want to upload the file and store the path to the file in the record.
 
Upvote 0
OK, then you need to create hyperlinks to the files.

Create a hyperlink field in the table underlying your form -- let's call it FileName.

To insert a file name in this field, place your cursor in the field and Insert > Hyperlink (or press Ctrl+K). You will get a dialog box. From the options on the left, select File. Browse to the file you want to link to, select it and click OK.

Check out this link for a tutorial complete with screenshots.

Denis
 
Upvote 0

Forum statistics

Threads
1,215,024
Messages
6,122,729
Members
449,093
Latest member
Mnur

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top