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!

Making a recordset a public variable.

Status
Not open for further replies.

dsk525

Programmer
Mar 13, 2002
73
US
Hi,

Need some help on delcaring a Recordset object as a public variable.

I am populating a recordset in a function. Then I need to use the data in a different function. I am able to delcare the Recordset and populate it in the function as
Dim Recoreset as New OLEDB.Recordset.

This works with in the function.

However, I want it to be public. So I declared the Recordset as Public in one of the modules.

Public Recordset as New OLEDB.Recordset.

This did not work. Recordset was not recognized when i tried to open it in a function.

The whole thing is that I need to populate the recordset in a function and be able to access the recordset data anywhere in the project.

I'd appreciate it if any one can help me on this issue!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top