S
samotek via AccessMonster.com
n my function listed below i get compile error in the following line :
adb.OpenCurrentDatabase (strDbName,,strPassword)
can you help ?
Private Function KillObject(strDbName As String, acObjectType As Long,
strObjectName As String, StrPassword As String)
'Call KillObject(GPath, 0, "products")
Dim StrPassword As String
StrPassword = "secret"
Dim db As DAO.Database
Dim adb As Object
Set adb = CreateObject("Access.Application")
adb.OpenCurrentDatabase (strDbName,,strPassword)
adb.DoCmd.DeleteObject acObjectType, strObjectName
adb.CloseCurrentDatabase
Set adb = Nothing
End Function
adb.OpenCurrentDatabase (strDbName,,strPassword)
can you help ?
Private Function KillObject(strDbName As String, acObjectType As Long,
strObjectName As String, StrPassword As String)
'Call KillObject(GPath, 0, "products")
Dim StrPassword As String
StrPassword = "secret"
Dim db As DAO.Database
Dim adb As Object
Set adb = CreateObject("Access.Application")
adb.OpenCurrentDatabase (strDbName,,strPassword)
adb.DoCmd.DeleteObject acObjectType, strObjectName
adb.CloseCurrentDatabase
Set adb = Nothing
End Function