mark curtis
Registered User.
- Local time
- Today, 18:15
- Joined
- Oct 9, 2000
- Messages
- 457
Dear all,
I use the code below to open another database from the current one I am in but I do not know how to close the current database and bring the opened one into view.
Private Sub cmdPSOArchive_Click()
On Error GoTo Err_cmdPSOArchive_Click
Dim objAccess As Access.Application
Dim strDB1 As String
Const strConPathToSamples = "\\Stsnt29\PROJECTS\Inventory\PSOArchive\PSOArchive.mdb"
Set objAccess = CreateObject("Access.Application")
With objAccess
.OpenCurrentDatabase (strConPathToSamples)
End With
Set objAccess = Nothing
Exit_cmdPSOArchive_Click:
Exit Sub
Err_cmdPSOArchive_Click:
MsgBox Err.Description
Resume Exit_cmdPSOArchive_Click
End Sub
Any help much appreciated
Thanks
Mark
I use the code below to open another database from the current one I am in but I do not know how to close the current database and bring the opened one into view.
Private Sub cmdPSOArchive_Click()
On Error GoTo Err_cmdPSOArchive_Click
Dim objAccess As Access.Application
Dim strDB1 As String
Const strConPathToSamples = "\\Stsnt29\PROJECTS\Inventory\PSOArchive\PSOArchive.mdb"
Set objAccess = CreateObject("Access.Application")
With objAccess
.OpenCurrentDatabase (strConPathToSamples)
End With
Set objAccess = Nothing
Exit_cmdPSOArchive_Click:
Exit Sub
Err_cmdPSOArchive_Click:
MsgBox Err.Description
Resume Exit_cmdPSOArchive_Click
End Sub
Any help much appreciated
Thanks
Mark