When you say "empty", do you mean that there appears to be data in the combo
box (i.e.: the right-hand scroll bar is active), but you cannot actually see
the values?
What version of Access are you using? What's the actual content of gs_sql?
(if you're using Access 2003 and you've got Format functions in your SQL,
you may need to apply the Access 2003 post-Service Pack 3 hotfix
http://support.microsoft.com/kb/945674 )
--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
Co-author: Access 2010 Solutions, published by Wiley
(no e-mails, please!)
"LAS" <(E-Mail Removed)> wrote in message
news:i3fhuq$t1v$(E-Mail Removed)...
>I have this code in a script. gs_sql, when cut and pasted to a query,
>returns the expected rows. But after this code is executed, the contents
>of the combo box are empty. What am I doing wrong?
>
> cboStudent_ID.RowSource = gs_sql
> cboStudent_ID.Requery
>