I am using this code to set the recordset for a combo box:
Set rstTemp = basRunDataObject("dbo.spcboNodeSubPortPartnerPort " & Forms!frmAANodeDetail!sfrNodeSub.Form!txtID & ",0", adCmdText)
Set Me!cboPartnerPortIDNo.Recordset = rstTemp
rstTemp.Close
Set rstTemp = Nothing
The function basRunDataObject returns an ADODB recordset.
After certain processes on the form I want to clear the recordset property so that there are no records showing in the combo box (the user needs to fill other fields so determine the new set of records to appear in the combobox).
Set Me!cboPartnerPortIDNo.Recordset = Null, and Set Me!cboPartnerPortIDNo.Recordset = "" both produce errors.
Is there a simple way to clear the Recordset property? I could run the stored procedure again to return no records but this involves a trip to the server and if there was a local solution this would be more efficient.
Set rstTemp = basRunDataObject("dbo.spcboNodeSubPortPartnerPort " & Forms!frmAANodeDetail!sfrNodeSub.Form!txtID & ",0", adCmdText)
Set Me!cboPartnerPortIDNo.Recordset = rstTemp
rstTemp.Close
Set rstTemp = Nothing
The function basRunDataObject returns an ADODB recordset.
After certain processes on the form I want to clear the recordset property so that there are no records showing in the combo box (the user needs to fill other fields so determine the new set of records to appear in the combobox).
Set Me!cboPartnerPortIDNo.Recordset = Null, and Set Me!cboPartnerPortIDNo.Recordset = "" both produce errors.
Is there a simple way to clear the Recordset property? I could run the stored procedure again to return no records but this involves a trip to the server and if there was a local solution this would be more efficient.