adding new records to tables based on items selected

  • Thread starter Thread starter ashley
  • Start date Start date
A

ashley

I have three unbound combo. The third combo box is
populated depending on what is selected from the second
combo box using an sql statement in the code for the row
source. The second combo box is populated depending on
what is selected from the first combo box using an sql
statement in the code for the row source. The code is
placed in the afterupdate function.

I added a new record to the first combo box using the
NotInList. When I tried adding a new record to the second
combo box for the item I added in the first combo box, it
gave me an error "Item not found in collection". I think
the problem is with my sql statement that I used as the
row source for the update function.

It is picking up the rowsource as "select
materials.materials, materials.shapes from materials where
materials.shapes = "square")

It doesn't like the = sign.

How can I fix this?

Thanks.
 
hi,
you need to put a dummy record in the table that your sql
in querying. then it will be in the colections.
 

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

Back
Top