Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / July 2005

Tip: Looking for answers? Try searching our database.

Browse Button

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Greg M. - 19 Jul 2005 18:02 GMT
1. I'd like to use a button on my form to browse for a file on the network
2. and then once the file is located place the name of the file in the text
box.  
3. I would later need to save and then reference that text field so that the
user can click on it and have the file open up in its native application.

I looked at The Access Web at http://www.mvps.org/access/api/api0001.htm, but
I'm not sure if the code should go in the button click or in a module.  This
code has a lot in it and I'm not sure how to apply it to my situation above.

Please help.

Thanks,
Greg
Bob - 19 Jul 2005 18:12 GMT
Generally you want to set the OnClick event for your button to [Event
Procedure] and place your code in the form's module. The easy way to do
that is to click the build button on the right side of the OnClick
event property field in the properties box and choose "Code Builder".
The code builder wizard will create an event procedure with the correct
name in the form's module, and open the VB editor for you to enter code.
Greg M. - 19 Jul 2005 18:34 GMT
I placed the code in the button using the code builder, but the compile is
giving me a lot of errors.  The first error is at the "declare function" line
stating only comments can come after a end function or end sub.

Has anyone a clean version of this code?  

Placing the code in the VB editor also breaks it into separate sub procedures.
Is this correct?

Thanks,
Greg

>Generally you want to set the OnClick event for your button to [Event
>Procedure] and place your code in the form's module. The easy way to do
>that is to click the build button on the right side of the OnClick
>event property field in the properties box and choose "Code Builder".
>The code builder wizard will create an event procedure with the correct
>name in the form's module, and open the VB editor for you to enter code.
Bob - 19 Jul 2005 18:42 GMT
I looked at the URL you posted, and it looks as if the code is intended
to be cut and pasted into the editor; i.e. it should work as it is. Why
don't you cut the code from the module and post it here so we can see
it?

Bob
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.