Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , , ,

How to add browse button to access 2007 form

Software Development



Reply
 
Thread Tools Search this Thread
  #1  
Old 31-08-2009
Member
 
Join Date: Oct 2008
Posts: 73
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?
Reply With Quote
  #2  
Old 31-08-2009
Member
 
Join Date: Dec 2008
Posts: 180
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).
Reply With Quote
  #3  
Old 31-08-2009
Pugsly's Avatar
Member
 
Join Date: Jan 2006
Posts: 5,184
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.
Reply With Quote
  #4  
Old 31-08-2009
Samra's Avatar
Member
 
Join Date: Mar 2008
Posts: 398
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads for: "How to add browse button to access 2007 form"
Thread Thread Starter Forum Replies Last Post
How to invoke a form from a button click using Java Swing? shelton141 Software Development 1 11-09-2009 07:54 AM
How to create button on visual C++ Form Ground 0 Software Development 3 14-08-2009 10:26 AM
How to create access clear button in the form using MS ACCESS T0tal L0$$ Software Development 3 09-06-2009 10:59 AM
Form SubForm ACCESS 2007 streetprods Software Development 2 30-05-2009 03:18 PM
How to connect the web form to Ms Access using ASP.NET? VijayW Software Development 2 16-02-2009 08:04 PM


All times are GMT +5.5. The time now is 11:40 PM.