How can i rewrite the following function include the password too :
Public Sub KillObject(strDbName As String, acObjectType As Long, strObjectName As String)
Dim strPassword As String
strPassword = "pin"
Dim db As DAO.Database
Dim adb As Object
Set adb = CreateObject("Access.Application")
adb.OpenCurrentDatabase (strDbName)
adb.DoCmd.DeleteObject acObjectType, strObjectName
adb.CloseCurrentDatabase
Set adb = Nothing
End Sub
Public Sub KillObject(strDbName As String, acObjectType As Long, strObjectName As String)
Dim strPassword As String
strPassword = "pin"
Dim db As DAO.Database
Dim adb As Object
Set adb = CreateObject("Access.Application")
adb.OpenCurrentDatabase (strDbName)
adb.DoCmd.DeleteObject acObjectType, strObjectName
adb.CloseCurrentDatabase
Set adb = Nothing
End Sub