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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening an existing database on the network from open database. 2

Status
Not open for further replies.

DBSSP

Programmer
Apr 1, 2002
327
US
Hey gang! I need a little help. I'm currently designing a database for scheduling purposes and would like it to also contain a switchboard that will allow the user to open another database on the network. I found some code that would work but it wouldn't take any of my path strings. With the number of databases I have to maintain, I'm sure it would be worth the trouble, so any help would be greatly appreciated!
 
Have you tried looking into the "Call" function? Look in Access help for it and if you have any questions, let me know.

By the by, here's how I open up other DB's from within one DB:

Dim dblShell As Double, strAccLoc As String
Dim strAccDB As String

strAccDB = """" & "DATABASEPATH" & """"
strAccLoc = SysCmd(acSysCmdAccessDir) & "MSACCESS.exe"
dblShell = Shell(strAccLoc & " " & strAccDB & " " & strMacro, vbHide)

Kyle ::)
 
Thank you Kyle, although I found that the original code did not work, when i inserted the call function, it allowed for Username and Password before trying to open the file. Your code has been most helpful!

Dim strAccDB As String
Dim strAccLoc As String

strAccDB = """" & "DatabasePath" & """"
strAccLoc = SysCmd(acSysCmdAccessDir) & "msaccess.exe"
Call Shell(strAccLoc & " " & strAccDB)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top