Code:
Private Sub Text3_Change()
Set cn = New ADODB.Connection
cn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;" & "Data Source=" & App.Path & "\Videoteka.mdb;Persist Security Info=False;"

cn.Open
Set rsNew = New ADODB.Recordset

StringQuery = "SELECT DISTINCT MovieName FROM Transactions WHERE MemberID = " & Text3.Text & " AND Returned = 'NO' "
On Error Resume Next
rsNew.Open StringQuery, cn, adOpenDynamic, adLockOptimistic, adCmdText

If rsNew.EOF = True Then
MsgBox " No such ID!"

Else

Do Until rsNew.EOF
List2.AddItem rsNew!MovieName
rsNew.MoveNext
Loop
cn.Close
End If


Set cn = New ADODB.Connection
cn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;" & "Data Source=" & App.Path & "\Videoteka.mdb;Persist Security Info=False;"

cn.Open

Set rsNew = New ADODB.Recordset

StringQuery = " SELECT FirstName,LastNamee,Debt,TMR FROM Members WHERE MemberID = " & Text3.Text & " "
On Error Resume Next
rsNew.Open StringQuery, cn, adOpenDynamic, adLockOptimistic, adCmdText

If rsNew.EOF = True Then
MsgBox "No such ID!"

Else


Label16.Caption = rsNew.Fields("FirstName")

Label18.Caption = rsNew.Fields("LastName")

Label20.Caption = rsNew.Fields("Debt")

Label22.Caption = rsNew.Fields("TMR")

cn.Close
End If
End Sub
Hello again!The above code shows my way of dealing with transactions.To be exact,I'm working on a VideoStore program.I use the above code to work with returned films.
I'll try to explain what the code does:

1.Enter MemberID in TextBox(Text3)
2.Use that ID and RETURNED value to select MovieName from table Transactions
3.If the Recordset is empty(RsNew.EOF=True) then notify the user that the ID is not valid.
4.Else,add the MovieName to List2.
5.Close the connection
6.Open it again,and select FirstName,LastName,Debt,TotalMoviesRented(TMR) from table Members where MemberID = Text3.Text
7.Place the values into corresponding labels.

Now,the reason I used On Error Resume Next:
If I enter a number in a textbox,and I clear it because I'd like to enter another one I get an error because in that moment Text3.Text is set to nothing.So,in my StringQuery MemberID=Nothing results in an error.
Is there a better way of dealing with this?

THE PROBLEM:
No matter which number I enter,it always executes the IF...THEN statement!Twice!
That means my Recordset is always empty.Why is that?How can it be empty if it's displaying MovieName is List2 and also displays data from Members table in labels?

I'll go rest now and come back later to think it through!