Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2002
    Location
    Hamilton,Ontario
    Posts
    132

    Lightbulb Unanswered: Function to Close Open Recordset

    Hi All
    I was wondering if someone can help me in making one function exactly like
    if isloaded(form......)
    but i want to iimplement the same idea in recordset wheren it will find the recordset and close it if it is open
    somethign like this

    if isopenRecordset(recordset as recordset) then
    'check if its state is open
    'close it if its open
    endif
    thanx in advance

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    i assume recordset as recordset is just for illustration - it's unorthodox to use reserved words for var names.

    can your function not simply:

    set Recordset = Nothing

    i can't see what harm this does if the recordset exists sufficiently to be passed-by-reference to the function.

    no idea if this works tho!!!!
    i tend to make temporary tables instead of recordsets if the records are going to be around longer than the function that creates them.

    izy

Posting Permissions

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