Dear friends iam making a vb program when i created splash screen and run the program splash screen run ok and next form with login pop up but when i enter my password to login on second form(FRMMAIN.frm) it give me error.when i remove splash screen it becomes ok again
here is both codes and iam highlighting the problem area
splash screen code
Option Explicit
Private Sub Form_KeyPress(KeyAscii As Integer)
Unload Me
FRMMAIN.Show
End Sub
Private Sub Form_Load()
lblVersion.Caption = "Version " & App.Major & "." & App.Minor & "." & App.Revision
lblProductName.Caption = App.Title
End Sub
Private Sub Frame1_Click()
Unload Me
End Sub
now the form FRMMAIN which gets error
Private Sub BCancel_Click()
FRMMAIN.MyOpen = False
Unload Me
End Sub
Private Sub BOK_Click()
Dim rs As New Recordset
With rs
If .State <> 0 Then .Close
.CursorLocation = adUseClient
.Open "Select * from Users", MyData.MyUsers, adOpenDynamic, adLockOptimistic---- iget error here...
If .RecordCount <> 0 Then
If .Fields!Password = Tpass.Text Then
MsgBox "Access granted.", vbInformation, "Granted"
FRMMAIN.MyOpen = True
Else
MsgBox "Access Denied.", vbCritical, "Denied"
FRMMAIN.MyOpen = False
End If
End If
End With
Unload Me
Set rs = Nothing
End Sub
Private Sub Tpass_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then BOK_Click
End Sub
kindly help me