G
Guest
I have an application that recently started to encounter a problem that I
can't find a solution for.
The application has a login form that requires the user to enter their id
and password and click "Login". The code opens another form and closes the
login form. On some machines MS Access quits completly. Here bis the code
behind the on click event:
***********
Private Sub btnCreate_Click()
On Error GoTo Err_btnCreate_Click
Dim rst As DAO.Recordset
Set rst = Me.Recordset
If IsNull(Me.txtID) Or IsNull(Me.txtCode) Then
MsgBox "You must enter a valid ID and Authenication Code.", vbCritical
Exit Sub
Else
If Me.txtID <> rst!ID Or Me.txtCode <> rst!AuthenicationCode Then
MsgBox "Invalid ID or Authenication Code." & Chr(13) & "Please try
again!", vbCritical
Else
strSignature = rst!AuthenicationCode
DoCmd.OpenForm "Resume"
DoCmd.Close acForm "frmUserLogin"
End If
End If
Exit_btnCreate_Click:
Exit Sub
Err_btnCreate_Click:
MsgBox Err.Description
Resume Exit_btnCreate_Click
End Sub
*****************
When I steped through the code it closed MS Access when the DoCmd.Close line
was executed. I remarked the line out and it still closed MS Access.
OS: Windows XP Home version 2002, SP2
MS Access 2000
If anyone has solution/reason it would be greatly appreciated.
Dwight
can't find a solution for.
The application has a login form that requires the user to enter their id
and password and click "Login". The code opens another form and closes the
login form. On some machines MS Access quits completly. Here bis the code
behind the on click event:
***********
Private Sub btnCreate_Click()
On Error GoTo Err_btnCreate_Click
Dim rst As DAO.Recordset
Set rst = Me.Recordset
If IsNull(Me.txtID) Or IsNull(Me.txtCode) Then
MsgBox "You must enter a valid ID and Authenication Code.", vbCritical
Exit Sub
Else
If Me.txtID <> rst!ID Or Me.txtCode <> rst!AuthenicationCode Then
MsgBox "Invalid ID or Authenication Code." & Chr(13) & "Please try
again!", vbCritical
Else
strSignature = rst!AuthenicationCode
DoCmd.OpenForm "Resume"
DoCmd.Close acForm "frmUserLogin"
End If
End If
Exit_btnCreate_Click:
Exit Sub
Err_btnCreate_Click:
MsgBox Err.Description
Resume Exit_btnCreate_Click
End Sub
*****************
When I steped through the code it closed MS Access when the DoCmd.Close line
was executed. I remarked the line out and it still closed MS Access.
OS: Windows XP Home version 2002, SP2
MS Access 2000
If anyone has solution/reason it would be greatly appreciated.
Dwight