try this now : add timer1 to your form !
VB Code:
Private Sub cmdSubmit_Click() ' Validate Inputs On Error GoTo Err_Check Dim strsql As String strsql = "Select * FROM tblUsers Where UserName = '" & txtUserName.Text & "'" 'Show flash movie FireTimer Set rst = New ADODB.Recordset rst.Open strsql, cnn, adOpenForwardOnly, adLockReadOnly If Not rst.EOF And Not rst.BOF Then If rst!Password = txtPwd.Text Then 'Stop the timer Timer1.Enabled = False frmSwitch.Show Me.Hide Else flaVerify.Visible = False 'Stop the timer Timer1.Enabled = False MsgBox "Invalid Password" cmdSubmit.Enabled = True End If Else 'Stop the timer Timer1.Enabled = False flaVerify.Visible = False MsgBox "Invalid User Name" cmdSubmit.Enabled = True End If rst.Close Exit_Check: Set rst = Nothing Exit Sub Err_Check: MsgBox Err.Description, "Login Function" Resume Exit_Check End Sub Sub FireTimer() Timer1.Enabled = True flaVerify.Visible = True cmdSubmit.Enabled = False End Sub Private Sub Form_Load() Timer1.Interval = 3000 Timer1.Enabled = False End Sub





Reply With Quote