Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

creating a field to link to a file on the hard drive

Status
Not open for further replies.

thefrstgatsby

Technical User
May 8, 2004
113
CA
How to I go about creating a field (which type do I use) that when used in a form can attach a file to the database (preferably by linking to a file on the harddrive), which can then be later retrieved using another form in the database?
 
Could you use a text field which contains the full pathname to the attached file?

Good Luck
--------------
To get the most from your Tek-Tips experience, please read FAQ181-2886
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
But then how would I create a button on a form to read that path and open the file. In addition it there would have to be a button that would open a window which would allow the user to browse to the file they wish to attach, and select it.
 
Both of these functions are easily doable. Although you may not necessarily need to have a button to open and read the file, as for example, you can place the pathname in the .Caption property of a label, and use the Label's click event to open and read the file.

Good Luck
--------------
To get the most from your Tek-Tips experience, please read FAQ181-2886
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
What is the field type, because the user is fairly computer illiterate, There has to be a browse function so that they can graphically select the path to the file that they want to attach.
 
A Text field.

Good Luck
--------------
To get the most from your Tek-Tips experience, please read FAQ181-2886
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Okay, I actually looked into the fields, and in the help it recommends that I use an OLE object as the field type. how do I add a form control that allows the user to link an excel file, or any file to a particular record?
 
Create a text field.

In the form select the properties of the field. At the very bottom of the all Tab select : IS Hyperlink, change to yes

this should help.

Some people make things happen, some watch while things happen, and some wonder 'What happened?'
 
Hi thefrstgatsby ,

I am trying to do the same thing as you are. I have been searching around and have found two sample databases which are really good. I am trying to put a browse button which would allow users to select their document. When they select their document/file, it would put a hyperlink in a listbox (I want them to be able to store multiple files). Anyways, I was able to find these examples but I am not able to duplicate it to fit my needs. Since I think we are trying to do the same thing, I wanted to send these your way in case they might do you some good. If you have figured out the issue, I would greatly appreciate any assistance. Thanks!


 
Thanks shwin, sorry for the serious delay, I'm looking into those now... did you find anything yet?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top