Hi All,
I'm trying to create a log in form for my database using a tutorial I found here. http://www.youtube.com/watch?v=_Kdr_L_DFOI. I got it working fine, but when I split my database into a front end and back end file I could no longer retrieve the record set for this code. I recieve the error "Item not found in this collection" on the highlighted line of code below. I'm at a loss as to how I would retrieve the record set with a split end database. The code used in the log on button is below, any help is appreciated.
Private Sub submitButton_Click()
Dim dbs As Database
Dim rstUserPwd As Recordset
Dim bFoundMatch As Boolean
Set dbs = CurrentDb
Set rstUserPwd = dbs.OpenRecordset("qryUserPwd")
bFoundMatch = False
If rstUserPwd.RecordCount > 0 Then
rstUserPwd.MoveFirst
Do While rstUserPwd.EOF = False
If rstUserPwd![UserID] = Me.userNameTextBox.Value And rstUserPwd![Password] = Me.passwordTextBox.Value Then
bFoundMatch = True
Exit Do
End If
rstUserPwd.MoveNext
Loop
End If