G
Gabriele Bertolucci
I have the following problem with Access XP and SQL 2005 Express Edition:
i would like to avoid visualization of Access default logon dialog when I
open my ADP procedure.
I've read the following MS article:
ACC2000: Access Project Prompts You to Log On Even Though "Blank Password"
Check Box Is Selected (Q202615)
Obviously I have my custom logon form.
ADP project has a form (a switchboard) which is opened at startup (after
user authentication) and is closed only when application quits.
Here is the Form_Unload event code for the switchboard:
Private Sub Form_Unload(Cancel As Integer)
On Error GoTo Form_Unload_Err
If MsgBox("Do you want to close the application?", vbYesNo + vbQuestion,
"Closing application") = vbYes Then
' Application.CurrentProject.CloseConnection
Application.CurrentProject.OpenConnection ""
Application.Quit
Else
Cancel = True
Exit Sub
End If
Form_Unload_Exit:
Exit Sub
Form_Unload_Err:
MsgBox Err.Description
Resume Form_Unload_Exit
Resume
End Sub
Unfortunately I'm receiving the following error:
"Method 'OpenConnection' of object '_CurrentProject' unsuccessful" (I translated
from italian, so may be something like this)
I tried to uncomment the linke of code with the CloseConnection, but unsuccessfully.
I tried to edit the line of code with the OpenConnection, passing no parameters,
but unsuccessfully too.
I would not think the problem is related to SQL 2005 Express Edition.
Who know most, please lift his hand and speak up!!! I would like it very
much
i would like to avoid visualization of Access default logon dialog when I
open my ADP procedure.
I've read the following MS article:
ACC2000: Access Project Prompts You to Log On Even Though "Blank Password"
Check Box Is Selected (Q202615)
Obviously I have my custom logon form.
ADP project has a form (a switchboard) which is opened at startup (after
user authentication) and is closed only when application quits.
Here is the Form_Unload event code for the switchboard:
Private Sub Form_Unload(Cancel As Integer)
On Error GoTo Form_Unload_Err
If MsgBox("Do you want to close the application?", vbYesNo + vbQuestion,
"Closing application") = vbYes Then
' Application.CurrentProject.CloseConnection
Application.CurrentProject.OpenConnection ""
Application.Quit
Else
Cancel = True
Exit Sub
End If
Form_Unload_Exit:
Exit Sub
Form_Unload_Err:
MsgBox Err.Description
Resume Form_Unload_Exit
Resume
End Sub
Unfortunately I'm receiving the following error:
"Method 'OpenConnection' of object '_CurrentProject' unsuccessful" (I translated
from italian, so may be something like this)
I tried to uncomment the linke of code with the CloseConnection, but unsuccessfully.
I tried to edit the line of code with the OpenConnection, passing no parameters,
but unsuccessfully too.
I would not think the problem is related to SQL 2005 Express Edition.
Who know most, please lift his hand and speak up!!! I would like it very
much