Solved

Making a Browse Button in Microsoft Access

Posted on 2001-08-02
4
203 Views
Last Modified: 2008-02-01
Hi, How could I go about in making a browse button for a file, not a directory.
0
Comment
Question by:manly9004
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 14

Accepted Solution

by:
mgrattan earned 50 total points
ID: 6345616
Here's a sample database that shows you various methods of using Windows Common Dialogs, including the Open File dialog that you want to use:

ftp://www.athree.com/pub/candace/candace/dialog/dialog.zip
0
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 6346469
what you need is to add the Windows Common DIalog Control to you Access Toolbox.  at the Botton Right corner of the tool box, click on the button that looks like a craoosed Hammer and Wrench.  That will  take you to a laong drop down list, that will show you ALL of the ActiveX (COM) controls that are currently installed on your Computer.  Scroll down the list to find the MicroSoft Common Dialog CXontrol.  Click on that line, and when you go back to your form, you can then place the control on the form.  It will appear as a small square control.  IT DOES NOT display at runtime.

Click on the control, and change its name (from ActiveXCtrl...) to CommonDialog

Then, in your code for the Browse button, On Click Event handler:

Private Sub cmdBrose_Click()
   Dim strFile as String
   CommonDialog.ShowOpen
   strFile = CommonDialog.FileName
   ' now add code to use that file path in some way
   ' perhaps addig it to a texct box
End Sub


0
 

Author Comment

by:manly9004
ID: 6348690
Prime example. Well done. Thanks a bunch.
0
 
LVL 14

Expert Comment

by:mgrattan
ID: 6349234
You're welcome.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

705 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