[AccessD] Fwd: Combo bound to ADODB not showing data

Stuart McLachlan stuart at lexacorp.com.pg
Wed Dec 2 16:30:09 CST 2020

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 your   
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.

More information about the AccessD mailing list