[AccessD] Fwd: Combo bound to ADODB not showing data
Paul.W at industrialcontrol.co.nz
Wed Dec 2 17:07:44 CST 2020
It can not be a delay in returning the subsequent recordset. When I
include my loop with the debug.print statements exactly where you describe
(before setting the combobox recordset) the data is reported but the combo
does not show it.
On Thu, 3 Dec 2020 at 11:33, Stuart McLachlan <stuart at lexacorp.com.pg>
> Hi Paul,
> Welcome to the List :)
> About the only thing I can think of is the presence of the timestamp
> causing the second
> recordset to take a bit longer to populate.
> ADODB is possibly returning control to your VBA as soon as the first
> recordset is returned by
> the USP and while the USP is still building the second recordset.
> If your call to .NextRecrodset is too quick, you may be populating the
> combobox with an
> empty recordset.
> A loop with a check on the number of records in rsTemp immediately after
> Set rstTemp = rstTemp.NextRecordset and before setting the combobox
> recordset may
> identify this
> On 3 Dec 2020 at 10:18, Paul Wolstenholme wrote:
> > The presence or absence of the timestamp column makes no difference to
> > the recordset that is retrieved as far as I can discern (same columns,
> > same data, same data type). This is consistent when the USP is called
> > by SSMS, a pass-thru query or the VBA code itself (verified using
> > debug.print statements).
> > Using the F9 or refresh (as distinct from 'refresh all') function in
> > the Access interface results in the combo correctly displaying the
> > data when opened. Alternatively, after the normal code to bind the
> > combo, which is:
> > Set rstTemp = rstTemp.NextRecordset
> > Set Me.MyControl_cbo.Recordset = rstTemp
> > If I add the following line:
> > Me. MyControl_cbo.Requery
> > Then the problem does not occur. However, I have found no reference
> > that has ever suggested the requery statement should ever be used in
> > this situation.
> AccessD mailing list
> AccessD at databaseadvisors.com
> Website: http://www.databaseadvisors.com
More information about the AccessD