Browsing Folders

Access_help_rob

Registered User.
Local time
Today, 13:44
Joined
Jul 3, 2003
Messages
66
Hi well im kinda new to here but heres my problem, I want to search for a folder on my hard drive and grab all of its contents which is just mainly text files and insert them into a table. I have been trying now for the last couple of days and cant seem to succeed if you could help me i would be very gratefull.
If this is not possible please tell me, also i wondered how i would just browse and display all the files in the folder, any help is good thank you .
rob
 
Use the Microsoft common dialog control.
You will find it under 'more controls' on the tool bar
 
Hey i cant seem to find that anywhere? im using access97 where can i find it if its not on the toolbar ?
cheers
rob
 
On the 'ToolBox' menu bar there is an icon with a hammer & spanner on it (more controls).
Click on this and you will get a drop down menu.
 
Hey again cheers for that the only prob is when i drag the box out its says i dont have the license to use active x controls or ole is there anything i can change so i can use it,
cheers
rob
 
You could try downloading the Microsoft Data Access Components 2.6 file.
 
Where would i be able to get that from thanks for all you help aswell its very much appreciated
rob
 
I don't have Hotmail.
You can email me if you want.
 
hey i have installed the link u gave me but it still wont let me use it and still bring up the same error message any more idea or is there any other way to get round to sloving my origional problem, and wot does this microsoft tool do?
cheers
rob
 
It allows you to open up a file window and browse through your folders. You can limit it to specific file extensions etc.
You can then use the selected file name within your app.

Have you tried re-installing office 97?
 
would that be able to run an automated process where by it selects all files say every morning in that folder and isert them all into a table? and would there then be a way of getting the data out of the that file into a field? the file type is a . rtf i know thats lot to help with but anything u know would be really helpfull
cheers
rob
 
This will not automate the import of data into a table.
You will need to write a routine to do this.

I have done routines to automate excel imports and csv imports, but not with rtf files.
If you want to send me your database I will see if I can help you.
 
i appreciate ur help i cannot however send u the database as it is over 500MB in size as it is my companys database. I have spoken to someone who does a lot of work in vba and i have been told that rtf files wont import into access due to the formating around them and access doesnt like it, he says i need to write some VBA so that these rtf files that open in word will open and then save as txt files and then i can import this data he says using the vba script, it sounds like it will work but i wondered do u have any knowledge of vba and know any where i can get some rough script to do all the above any help is great cheers
rob
 
You are not going to be able to open a word doc and resave it as a txt file from within access.
You can open the document with word but thats about it (I'm sure someone will correct me if I'm wrong).

Once you have the txt documents do you want to create a new table or append the data to an existing table?
 
Hi Rob,

I am facing the same problem can you please help me if you solved yours ??
Thanx
 
Here is a link to some code for using the Microsoft Browse for Folder window from Access. Very simple to implement: BrowseFolder Dialog .

If you are trying to get at a specific file: Call the standard Windows File Open/Save dialog box .

This thread here has information on using the Dir function and VBA to loop through the files within a folder: Manipulating files .

Finally, if you need to automate Word actions (like manipulating those rtf files) from within Access: OFF2000: Microsoft Office 2000 Automation Help File Available . It's tailored to Access 2000, but most of the code samples should work fine for Access 97.
 

Users who are viewing this thread

Back
Top Bottom