Return table fields that are Not Null for combo box list

C

chohnz

I have a form where the user chooses a certain site from the first combo box.
I want the second combo box to then be populated with only the fields that
have values associated with that first field.

To be specific, the first field is a list of field sites (site_no). The
remaining fields are parameters measured at the sites - EXCEPT some sites
have no data for ceratin parameters. One site may have temperature AND
precipitation data, while another site may only have temperature data. In
the first combo box, if the user selects the site with only temperature data,
I want the second combo box to only offer Temperature as a choice.

Thanks.
 
J

Jeanette Cunningham

chohnz,
you need more than one query that can be the row source for the second combo
box.
You use the values from the first combo to choose which query to use for the
second combo.
If the first combo has null for temp then, the second combo uses the query
that just has temp.

You can change the number of columns and the columns with code.
Try out Me.ComboName.ColumnCount
ColumnHeads, ColumnWidth, ColumnHidden, ColumnOrder ....etc in the vba
editor


Jeanette Cunningham -- Melbourne Victoria Australia
 

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