|
|
![]() |
| Thread Tools | Search this Thread |
#1
| |||
| |||
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
| |||
| |||
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
| |||
| |||
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
| |||
| |||
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. |
![]() |
|
Tags: access 2007, browse button, vb folder, working directory |
Thread Tools | Search this Thread |
|
![]() | ||||
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 |