closing this recordset

icemonster

Registered User.
Local time
Yesterday, 18:23
Joined
Jan 30, 2010
Messages
502
so i know that when you set the recordset you can set the variable to set it for rs = nothing, but how would you close this?

Code:
With Form_frm_details_student
    .RecordSource = strSQL1

' if this was a field/listbox it would be

with me.listbox
          .rowsource = strSQL!
          .value = null <- this nulls the source

' if it was set for a form as the recordsource as you can see above, what would be the next line after setting the source?

'if i am not making any sense its because i have not slept yet. :p:p:p

    
End With
 
There's nothing that needs to be closed in what you posted. As a rule of thumb, anything you set using the word "Set" should be closed or set to nothing.
 
so

Code:
with Form_frm_one
.recordsource = strSQL
set = nothing <-- is this it?

because when i close the form then open it again, there is a record source set.
 
wait, i get it now. since i didnt "set" anything, i don't need to close it. thanks! :)
 
No problem. You're setting a property there, not an object like a recordset.
 

Users who are viewing this thread

Back
Top Bottom