capt_alberta
Nov 17th, 2000, 09:52 PM
My VB6 data entry project involves a global class module (gRecsClass) that manipulates a DAO datacontrol on each of six different forms.
In frmMain I have declared WorkingForm as Form and assigned it the name of the selected form (to standardize several routines).
In order to use the VB6 report package I have had to use an ADO connection.
The problem -- if the WorkingForm has a recordset, it won't go away! Setting gRecsClass = Nothing and WorkingForm = Nothing won't release the file. (The actual form is also set to nothing in the Form_Unload Event.)
If you enter data and then try to print the report, MSJet complains that the file is still open and won't use the ADO connection.
However, using the ADO recordset first does not interfere with opening the DAO WorkingForm to enter data.
What am I missing (or is there a "Gotcha" lurking somewhere in the wings)?
In frmMain I have declared WorkingForm as Form and assigned it the name of the selected form (to standardize several routines).
In order to use the VB6 report package I have had to use an ADO connection.
The problem -- if the WorkingForm has a recordset, it won't go away! Setting gRecsClass = Nothing and WorkingForm = Nothing won't release the file. (The actual form is also set to nothing in the Form_Unload Event.)
If you enter data and then try to print the report, MSJet complains that the file is still open and won't use the ADO connection.
However, using the ADO recordset first does not interfere with opening the DAO WorkingForm to enter data.
What am I missing (or is there a "Gotcha" lurking somewhere in the wings)?