Consulting

Results 1 to 2 of 2

Thread: Accessing recordsets

  1. #1
    VBAX Regular
    Joined
    Feb 2015
    Posts
    80
    Location

    Accessing recordsets

    I have a general question on accessing recordsets

    My VBA creates a recordset in module1.

    I purposefully did not close the connection or the recordset.

    I would like to be able to re-use the recordset in a couple of different modules (say 2 and 3).

    Is this even possible? Im looking for any sites, literature, etc that can help. Any direction you can give is greatly appreciated.

    Thanks in advance.

    -Chunk

  2. #2
    VBAX Mentor
    Joined
    Nov 2022
    Location
    The Great Land
    Posts
    336
    Location
    Declare recordset object variable in module header. Google "public global variable".
    How to attach file: Reading and Posting Messages (vbaexpress.com), click Go Advanced below post edit window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •