Results 1 to 4 of 4

Thread: How to add browse button to access 2007 form

  1. #1
    Join Date
    Oct 2008
    Posts
    100

    How to add browse button to access 2007 form

    Do you know how to add a "Browse" button on a form because I want the user to be able to select a working directory by clicking a 'browse' button. I want the user to be able to, click of a button, and looking through that folder and find the correct file. I also need to know if there is a way to create a "browse" button that the user can click and then search for a file to attach, then the path name of that file is stored in my table. Is this possible in VB?

  2. #2
    Join Date
    Dec 2008
    Posts
    202

    Re: How to add browse button to access 2007 form

    If you want a command button as well, put this into its Click event procedure:

    Me.[NameOfYourHyperlinkFieldHere].SetFocus

    RunCommand acCmdInsertHyperlink. I think that last paren is linked with the one right after tsGetFileFromUser. Side note though, what is tsGetFileFromUser? tb must be text box, but what does the ts represent? Note that both methods use a FileDialog object, so you'll need a reference to Microsoft Office Object Library in your References (Tools -> References from the code window).

  3. #3
    Join Date
    Jan 2006
    Posts
    6,878

    Re: How to add browse button to access 2007 form

    The only advantage of the API call is that it doesn't care which version of Access you have. You do not have all the code necessary to use this Sub. "tsGetFileFromUser" is a function that you need, but appears that you did not copy into your VBA project. For example, If you write your application in Access 2003 (Office Object Library v11) and an Access 2000 (v10 I think) tries to run it, it will probably fail. If all your users are on the same platform, the FileDialog is the better route.

  4. #4
    Join Date
    Mar 2008
    Posts
    433

    Re: How to add browse button to access 2007 form

    In the Design tab, use the Controls group to click the button you want to use, I just noticed there are modules in the program too. I've never used them before, but now I see where all those random names are. I'll try to make sense of it. Note that this same this is true when connecting to applications like Excel, Word, etc. Setting up variables as Excel.Application, Word.Application, etc. work great if everyone is on the same platform.

Similar Threads

  1. Can anyone access and know what i browse
    By lim in forum Technology & Internet
    Replies: 2
    Last Post: 06-10-2010, 03:12 PM
  2. How to create button on visual C++ Form
    By Ground 0 in forum Software Development
    Replies: 3
    Last Post: 14-08-2009, 10:26 AM
  3. How to create access clear button in the form using MS ACCESS
    By T0tal L0$$ in forum Software Development
    Replies: 3
    Last Post: 09-06-2009, 10:59 AM
  4. Form SubForm ACCESS 2007
    By streetprods in forum Software Development
    Replies: 2
    Last Post: 30-05-2009, 03:18 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,576,134.33896 seconds with 17 queries