Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 17th, 2005, 05:47 PM
Friend of Wrox
 
Join Date: Mar 2005
Location: , , .
Posts: 264
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to browse and load mdb file from access form

how to browse and load mdb file from access 2000 form?

Hi guys. I want to design an access 2000 application that does the following.Inside a form
I want to be able brosse my hard disk and select an access mdb file . once i selected the db and click on ok,i want to be able to work on that mdb as if i opend it diretly. I be happy if some one teach me how to
create such browse mdb functionality. you can see the picture below.Thanks

http://i5.photobucket.com/albums/y18...roserfordb.jpg (pic of browse mdb option)
Reply With Quote
  #2 (permalink)  
Old June 18th, 2005, 09:52 AM
Friend of Wrox
 
Join Date: Nov 2004
Location: Seattle, WA, .
Posts: 248
Thanks: 0
Thanked 1 Time in 1 Post
Default

Just FYI. You are reinventing the wheel. There are plenty of lauchers available to do what you want.

How they work...

First you'll have to decide how you want to "browse your hard disk". Plenty of ways to do that. But you might want to check out the FileSystemObject for looking at "file system objects". This will give you a way to load file names to your form. There are also COM objects that you can use to pop up a file search dialog.

When you've chosen the method to provide the file name to the user, launching the database can be accomplished in several ways as well. How you do that will depend on how much control you want of the application that is launched from within the application that has the form that lists the files.

Check out the SHELL function for one possibility. Easy to launch your database but very difficult to control without using Windows API calls. That code can be as simple as:

Shell(your_file_name)

You could create your own instance of Access. This allows more control but you'll have to be careful not to destroy your instance of Access before the user is finished with the database. That code has some of this in it:

dim app as New Access.Application
app.OpenCurrentDatabase your_file_name
app.Visible = True
app.UserControl = True
' wait until the user is finished
set app = Nothing
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access is denied" load a simple xml file nana XML 12 May 12th, 2010 07:01 AM
Creating Access (.mdb) file from ASP mfarooqw ASP.NET 2.0 Basics 1 June 5th, 2007 02:39 AM
Open mde or mdb access file from vb6 gorgo Pro VB 6 1 February 20th, 2006 01:39 AM
How to auto load(on start) a form in access 2000? method Access 1 June 17th, 2005 10:55 PM
Manage the .ldb file when ADO opens a Access .mdb marcelescu Visual C++ 1 October 18th, 2004 06:44 PM



All times are GMT -4. The time now is 12:23 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.