Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compile error 1

Status
Not open for further replies.

samotek

Technical User
May 9, 2005
197
BG
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
 

Continued from thread705-1426328

Maybe you should get rid of the parenthesis

adb.OpenCurrentDatabase strDbName, , strPassword

Sorry about that
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top