Hi,
I have the following module run when the form loads. It works fine under Windows XP, but under Windows 2000, the form freezes and just stays there. It is supposed to close, but it doesn't.
Here's the code from the module:
What could be messing it up?
Thanks
I have the following module run when the form loads. It works fine under Windows XP, but under Windows 2000, the form freezes and just stays there. It is supposed to close, but it doesn't.
Here's the code from the module:
Code:
Option Compare Database
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 & "\" & "Database.mdb", , "Password"
OpenPasswordProtectedDB = True
End Function
What could be messing it up?
Thanks