Hey everybody. I sort of finished up on thisissue, except I keep getting the error I put in. Why?
Private Sub cmdSearch_Click()
Dim sql As String, conn As String
Dim rs As New ADODB.Recordset
Dim dpath As String
dpath = "C:\dvd\dvd.mdb"
conn = "provider=microsoft.jet.oledb.4.0;data source = " & dpath
sql = "SELECT * from movie"
rs.Open sql, conn
With rs
.MoveFirst
Do Until .EOF
If .Fields("ID"

= frmMain.txtID.Text Then
frmMain.txtCatagory.Text = .Fields("Category"

If .Fields("Date"

<> "" Then ' Not required
frmMain.txtDate.Text = .Fields("Date"

End If
frmMain.txtDirector.Text = .Fields("Director"

frmMain.txtID.Text = .Fields("ID"

If .Fields("LentOut"

<> "" Then ' Not required
frmMain.txtLentOut.Text = .Fields("LentOut"

End If
frmMain.txtMovie.Text = .Fields("Movie"

frmMain.txtRating.Text = .Fields("Rating"

Else
MsgBox "Invalid Movie ID", vbCritical, "Error"
End If
.MoveNext
Loop
End With
rs.Close
End Sub
It will step through as if it accepts the fact that the txtID.text and the ID field match, but it will flash the message box about 5 times before it will quit flashing it. Any ideas?
Cheers