Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

recordset.MoveFirst problem

Status
Not open for further replies.

Atomsk

MIS
Jun 3, 2003
60
US
Dim db_05, rs_05
Set db_05 = CreateObject("ADODB.Connection")
db_05.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=C:\Program Files\Access Pages\gap_db01.mdb"
Set rs_05=db_05.execute("SELECT * FROM dueWithin1Week")

rs_05.MoveFirst '<<PROBLEM


The above works fine if the record source being accessed has at least one record. If NULL, however, it doesen't work at all, so I'm trying to determine whether or not the record source is NULL.


If rs_05 <> NULL Then '(or If rs_05 <> &quot;&quot;)
rs_05.MoveFirst
Else
MsgBox &quot;Is Null&quot;
End If


The above gives me a &quot;Type mismatch&quot; error on runnning. Does anyone know how to fix this? Thanks.
 
Never mind, I figure it out myself.

If not rs_21.EOF Then
rs_21.MoveFirst
Else
End If

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top