Newbie wrote:
I have a combobox on a form.
Coming from VB, I like to build a dynamic SQL statement and then set
the control's data source to the SQL statement.
Please tell me how to do that in access using the VB editor.
I have the dynamic SQL statement working fine, I just need to set the
control's source programatically.
Thanks in advance.
If by "data source" you mean the rows displayed in the drop down list then
that is actually the RowSource property of the ComboBox. All you need is...
Me.ComboBoxName.Rowsource = "Your SQL"
--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com