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 as optional parameter 1

Status
Not open for further replies.

Gzep

Programmer
Mar 8, 2001
46
AU
if a recordset is passed as an optional parameter, to a function (but not used) it is not Missing or Empty once the code in the called function is running, but has a value of "nothing" - ie no allocated memory space for the object.

Is there a test (other than error-traping) that will tell me if the recordset is valid???
 
Hi,

You might wanna take a look at the vb help in access under "recordsets collection" , it shows how to enumerate the recordsets that are set within a db, in the same way you should be able to test wether or not a rst (with a given name) is set or not.

if you need any more help, do reply !

the kid.
 
You can use the syntax "object Is Nothing". The syntax description (in Access 97 Help) says that the Is operator requires object names, but the Nothing keyword acts like an object literal constant. Rick Sprague
 
Thanks, Karatekid, forgot to mention that I had tried that.

Extra thanks RickSpr, I hadn't tried that, based on the fact
that Null etc need a function to test them. It works well.

Gzep. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top