Browse [Find a directory or file] (1 Viewer)

Status
Not open for further replies.

ghudson

Registered User.
Local time
Today, 09:12
Joined
Jun 8, 2002
Messages
6,199
This is just a quick resoration of my Browsing sample since the original thread and sample was lost when this forum was hacked. I am working on an improved version of my Browsing sample. Check back soon for I hope to have this thread updated.

The attached sample db illustrates how to call the Windows "Browse for folder" or "File Open/Save" dialog controls using API functions. There are many reasons that I use the API methods instead of the built-in Common Dialog or ActiveX controls. The attached sample is in Access 97 but it will easily convert and work with the newer versions of Access [because it does not need any references].

Every week there are numerous postings on this forum asking how to allow a user to select a file or directory within an Access db. I have collected bits and pieces of code over the years and my sample will show you how easy it is to integrate my examples into your database. The fBrowseDirectory form illustrates how to call the browse for directory dialog and export a report to the selected directory. The fFindOpenImportFile form illustrates how to search and select a file and the option to open or import the selected file. The fScanDirSelectFileFromCombo form illustrates how to list all files within a specific directory in a combo box and how to open the selected file. The fScanDirSelectFileFromTable form illustrates how to list all files within a specific directory in a continous form [from the tFiles table] and to open a file from the list. The fScanDirSelectFileFromTable form also displays the modified date and the total file size for each file listed.

You will have to open the forms in the design view and examine the VBA coding in the forms modules to learn how the functions work for each of my examples. Some of the bigger functions are in the database modules and I have included any references to the originators of the functions I have found. None of my methods use any external references so you should be able to import my samples directly into your application. All of my examples will work with any version of Access.

Happy browsing!

Read this if you do not understand where to post your questions! >>> Please Read Before Posting

Please do not directly PM me with any questions related to my Browsing example. Please do not post any questions related to my Browsing example in the Samples forum. If you have a question related to the Browsing sample.... Please post your questions in the appropriate forum and include a link to this thread if you have a question or problem related to my Browsing example I will be glad to help if I see your post and if I am available.

Key words: browse, search, seek, find, file, common dialog, file open, file save, dialog box, folder, directory, api, activex, browseforfolder, getopenfilename, getsavefilename, comdlg32.dll, shell32.dll, shellexecute

The attached Browsing2.zip file is an improved version of the previous Browsing sample file I had originally attached.
 

Attachments

  • Browsing2.zip
    131.1 KB · Views: 33,240
Last edited:
Status
Not open for further replies.

Users who are viewing this thread

Top Bottom