Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Making a Browse Button in Microsoft Access

Posted on 2001-08-02
4
Medium Priority
?
207 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 200 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

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

618 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