Use query for Row Source?

G

Guest

I attempted to use a combo-box to look-up records on a form. The RowSource
query that is generated by the wizard included 2 data fields. I wanted to
show only a distinct list of the second, non-key data element (col1). When I
changed the RowSource query to SELECT distinct Col1, the combo-box displays
nothing. I then created a stored query with the SELECT distinct Col1. They
query runs correctly, but when I put in in the RowSource, it displays nothing.

Any clue what I could be doing wrong?
 
F

fredg

I attempted to use a combo-box to look-up records on a form. The RowSource
query that is generated by the wizard included 2 data fields. I wanted to
show only a distinct list of the second, non-key data element (col1). When I
changed the RowSource query to SELECT distinct Col1, the combo-box displays
nothing. I then created a stored query with the SELECT distinct Col1. They
query runs correctly, but when I put in in the RowSource, it displays nothing.

Any clue what I could be doing wrong?

Using the same Combo box properties as generated by the wizard?
You've gone from 2 columns to one.
Change the column widths from something like 0",1" to 1"
Also change the column count from 2 to 1.
Make sure the Bound column is 1.
 
G

Guest

Interesting. Why VBA choose to get 2 columns when I select one will remain a
mystory. Thanks for the tips on how to make it work. I very much appreciate
it.
-JHC
 

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