Opening a remote database from the switchboard of another database

poet1234

Registered User.
Local time
Yesterday, 23:47
Joined
Oct 7, 2004
Messages
46
Hello, I am using the following code to open one database from another database.

Sub OpenRT()

Static acc As Access.application
Dim db As DAO.Database
Dim strdbname As String
strdbname = "s:\CIO\ISI\RAG\RAMTRACK\Access2000\Backup\Ramrod.mdb"
Set acc = New Access.application
acc.Visible = True
Set db = acc.DBEngine.OpenDatabase(strdbname, False, False, ";PWD=WSFinancex")
acc.OpenCurrentDatabase strdbname
db.close
Set db = nothing

End Sub

Does anyone out there know how I can force the remote d/b to display a form other than the form that is specified in the start-up menue? The reason for this is that some users will open the remote database directly and use the form that is specified in the start-up menue. Other users will use a special switchboard from another database to open a specific form in the remote database.
 
Add:
acc.DoCmd.OpenForm ("frmName")
after
acc.OpenCurrentDatabase strdbname
Obviously substitute frmname with the name of the form you wish to open in other database
 
Hi. I tried Macca's suggestion, however it doesn't quite do what I need it to do. It opens the other database, but it goes directly to the form specified in the "startup" menu, rather than the form I am telling it to open. I thought that perhaps if I removed any form reference from the "startup" menu, that would do it, but it doesn't. Does anyone know of anything else I could try? Thanks in advance. :(
 

Users who are viewing this thread

Back
Top Bottom