Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2002
    Location
    Washington D.C.
    Posts
    164

    Unanswered: Reusing an open recordset

    Hi,
    If I open a recordset on one form and don't close it, how can I reuse the set on another form?

  2. #2
    Join Date
    Jul 2002
    Location
    Romania
    Posts
    122
    If the recordset is defined in the form, you cannot use it from outside the form because by definition it is a private variable, invisible to other objects.

    If you declare the recordset in a module as a public variable, you can use it from everywhere. But you have to make sure it is closed when you don't need it anymore.

    Good luck

    Dan

  3. #3
    Join Date
    Dec 2002
    Location
    Washington D.C.
    Posts
    164
    Got it! thanks


    Originally posted by DannyY
    If the recordset is defined in the form, you cannot use it from outside the form because by definition it is a private variable, invisible to other objects.

    If you declare the recordset in a module as a public variable, you can use it from everywhere. But you have to make sure it is closed when you don't need it anymore.

    Good luck

    Dan

  4. #4
    Join Date
    Oct 2002
    Location
    Leicester - UK
    Posts
    820
    Originally posted by DannyY
    If the recordset is defined in the form, you cannot use it from outside the form because by definition it is a private variable, invisible to other objects.

    If you declare the recordset in a module as a public variable, you can use it from everywhere. But you have to make sure it is closed when you don't need it anymore.

    Good luck

    Dan
    not it they mean the forms base recordset or if they declare the recordset as public
    Definition of a Beginner, Someone who doesn't know the rules.

    Definition of an Expert, Someone who knows when to ignore the rules.

Posting Permissions

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