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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

access form database login

Status
Not open for further replies.

jurgen

Programmer
Feb 8, 2001
209
BE
I'm trying to create an alternative SQL Server login Box then the one you get buy default from SQL Server.

In access 2k adp project, if I open the project in stead of the default one, i wan't to create my own form. With this way I wan't to display the error messages in message that's understandable for the user, like "password incorrect", or "server not available for the moment".

Does someone have a form with those thing, or just a hint how I can intercept this and create my own ?

Regards

Jurgen )
 
Hi!

You can analise errors and create msg boxes for you interested cases.

Private Sub Form_Load()
On Error GoTo Err_Form_Load
'VBA codes
'.......
'.......

Exit_Form_Load:
Exit Sub

Err_Form_Load:
Select Case Err.Number
Case 70 'Permission denied
MsgBox "Message text 1"
'Commands to run
'...........
'...........
Case 3044 ''|' isn't a valid path.
'Make sure that the path name is
'spelled correctly and that you are
'connected to the server on
'which the file resides.
MsgBox "Message text 2"
'Commands to run
'...........
'...........
Resume Next 'For example
Case N
MsgBox "Message text N"
'......
'etc.
Case Else
MsgBox "Error No " & Err.Number & vbLf & _
Err.Description & vbLf & _
"Please inform your DB administrator about this error!"
'vbLf = chr(10); vbCrLf = chr(10) + chr(13)
End Select
End Sub

Aivars
 
How can I connect to the database without that screen of SQL server, I can't find the connectstring for ADO, i always get errors ...

JJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top