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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sql text and visual basic

Status
Not open for further replies.

Kori

Programmer
Oct 17, 2000
35
0
0
US
I have a part of code that calls a routine that sets up a sql text. If the data I am looking for is not in the database it crashes. Here is the line I open the data base with:

Set sn = g_cmwdb.OpenRecordset(sqltext, dbOpenSnapshot, dbReadOnly)

How do I know there isn't any data in the recordset I have initialized? Rather than getting a error called

'invalid procedure call or argument'

Help!!!!
 
You can use the "On Error" function with resume next or end sub.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top