Please let me know if I am in the wrong forum... I am trying to open one database from another using the code below. When I run this it opens an Access window, asks me the security question whether or not I want to open the database (which is normal) and when I click on "Open" it just disappears... any help would be appreciated.
Dim appAccess As Access.Application
Private Sub Command0_Click()
Dim strDB As String
Const strConPathToSamples = "U:\Daily Queries\SMA\"
strDB = strConPathToSamples & "Copy of Copy of Desktop SMA.mdb"
Set appAccess = _
CreateObject("Access.Application")
appAccess.OpenCurrentDatabase strDB
appAccess.DoCmd.OpenForm "ItWorks"
End Sub
Dim appAccess As Access.Application
Private Sub Command0_Click()
Dim strDB As String
Const strConPathToSamples = "U:\Daily Queries\SMA\"
strDB = strConPathToSamples & "Copy of Copy of Desktop SMA.mdb"
Set appAccess = _
CreateObject("Access.Application")
appAccess.OpenCurrentDatabase strDB
appAccess.DoCmd.OpenForm "ItWorks"
End Sub