Hi,
I get the following error message and it highlights the following code when I use this module:
Code it Highlights
Where it says "acc.OpenCurrentDatabase", it highlights the OpenCurrentDatabase portion.
Error Message
"Compile Error: Wrong number of arguments or invalid property assignment"
I only get this error message when using Access 97. When I use Access XP, it works fine.
What might the problem be?
Thank you very much,
Alex
I get the following error message and it highlights the following code when I use this module:
Code:
Option Compare Database
Option Explicit
Private Declare Function apiShowWindow Lib "user32" _
Alias "ShowWindow" (ByVal hwnd As Long, _
ByVal nCmdShow As Long) As Long
Function OpenPasswordProtectedDB() As Boolean
Static acc As Access.Application
Dim Lox As Long
Lox = apiShowWindow(hWndAccessApp, 2)
Set acc = New Access.Application
acc.Visible = True
acc.OpenCurrentDatabase CurrentProject.Path & "\" & "Access.mdb", , "password"
OpenPasswordProtectedDB = True
End Function
Code it Highlights
Where it says "acc.OpenCurrentDatabase", it highlights the OpenCurrentDatabase portion.
Error Message
"Compile Error: Wrong number of arguments or invalid property assignment"
I only get this error message when using Access 97. When I use Access XP, it works fine.
What might the problem be?
Thank you very much,
Alex