mark909 said:
Ive got a form set up in a database with a label hyperlinked to open up
another database when clicked.
Is it possible to make it so that the current database closes when the new
one opens
You can't do this with a hyperlink. You could have an autoexec macro (or
startup code) in the newly opened database automatically locate and close
the application window that had the previous database open.
Or (better, to my way of thinking) you could use code like this in the first
database to open the new database and close the current one:
'----- start of example code -----
Private Sub cmdSwapDB_Click()
Dim strNewDatabase As String
strNewDatabase = "C:\Users\Mark\Documents\NewDB.mdb"
Shell "msaccess.exe " & Chr(34) & strNewDatabase & Chr(34),
vbNormalFocus
DoCmd.Quit acQuitSaveNone
End Sub
'----- end of example code -----