combo box in subform is blank

B

buggirl

Good morning,

I'm trying to add a combobox into a subform, but when I look at the
drop-down list in Form View, it is empty.

I've tried developing the form and subform in several ways (from tables
and/or queries).

Any suggestions on what is happening?

If you need more info, let me know.

buggirl
 
J

Jeff Boyce

What is the sql statement you are using to 'fill' that combobox?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
B

buggirl

Ooh, crikey. I've got nothing so fancy as an SQL statement, and I don't even
know how to retrieve it from a form for you.

I have simply been using the Form Wizard based on a query with all of the
fields I require in the form. Then, once the form and subform are built, I
attempt to change the field to a combo box (but it ends up blank).

This may seem a little primitive, but that's how I did it! ;)

buggirl
 
J

Jeff Boyce

A combobox lists choices from ... somewhere. It might be a list you entered
('value list'), or it might be a query that retrieves potential values from
some table. A query is just a sql statement, prettied up.

Go to the form in design view, click on the combobox, open the properties
window. What is in the property named "Row Source"?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
B

buggirl

Hooray! I have it sorted out.

"Row Source" was blank, so I changed it to the table that the query was
derived from (the ultimate source), and then moved columns around in the
original table so that the field I wanted was in the first column.

Now, I'm wondering if I can add new data to the table via the form. The
combo box is a list of invertebrates that we have in our collection, and
sometimes we get new ones. At the moment, I have to go back to the original
table and add it in there, then go back to my form. Any suggestions?

And thanks very much for your help already!

buggirl
 
J

John W. Vinson

Now, I'm wondering if I can add new data to the table via the form. The
combo box is a list of invertebrates that we have in our collection, and
sometimes we get new ones. At the moment, I have to go back to the original
table and add it in there, then go back to my form. Any suggestions?

Use the "Not In List" event of the combo box to either open a form to add the
invertebrate info, or (if you only want to add the species name and no other
data) just update the table directly. There's sample code at
http://www.mvps.org/access/forms/frm0015.htm
 

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