Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open database with vba 2

Status
Not open for further replies.

labanTek

Instructor
Dec 3, 2004
37
Hi can someone tell me how to open another Ms Access database when a command button is clicked on a database that is already open?
Thanks in advance.
 
It depends on what you want to do. This may suit:
FollowHyperlink "C:\tek-tips.mdb"
 
As Remou said, depends on your objective.
FollowHyperlink, or Shell()

To run DDL operations, or DLL from initially opened DBase, you may want to use DAO OpenDatabase(), or ADO/ADOX.Connection()
 
Thanks to you both for the valuable information. Can I also delete a file or database using vba? If so what is the code?
Thanks in advance.
 
[tt]Kill "c:\tek-tips.mdb"[/tt]

Might check if the file exists first (Dir function?)

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top