Making a recordset a public variable.

dsk

Registered User.
Local time
Today, 11:01
Joined
Dec 6, 2001
Messages
11
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!
 

Users who are viewing this thread

Back
Top Bottom