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

Reply
 
Thread Tools Search this Thread
  #1  
Old 31-08-2009
Member
 
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?
Reply With Quote
  #2  
Old 31-08-2009
Member
 
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).
Reply With Quote
  #3  
Old 31-08-2009
Member
 
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.
Reply With Quote
  #4  
Old 31-08-2009
Member
 
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



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
Can anyone access and know what i browse lim Technology & Internet 2 06-10-2010 03:12 PM
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


All times are GMT +5.5. The time now is 05:54 PM.