Field List as Row Source for Combo box

J

JimS

I have a list box "lbSATrans". Its RowSource is set in VBA, It's a long SQL
query. It works fine, including the header row.

I have a combo box "cbSortOrder". Its RowSourceType is "Field List", and I
copy the RowSource from lbSATrans into the RowSource of cbSortOrder, then
requery it every time I requery lbSATrans.

My expectation is that cbSortOrder will contain the field names of the query
underlying lbSATrans, and it does. Unfortunately, when I use some of the
field names to modify the "ORDER by" clause of lbSATrans, some of those field
names are invalid, I think because they are not sufficiently qualified. The
revise RowSource for lbSATrans with the revised "ORDER by" clause returns
nothing.

How would you resolve this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top