Combo Box contents should have changed

S

Stapes

Hi

I have a combo box on a subform that is used to display the name items
from another table refered to by a Foreign Key. I am opening another
form and adding a new item to this other table, but when I return, the
new items name does not show. If I close the form and re-open it, the
name re-appears. I use a .requery on the subform after my new record
is saved, but that does not help. I am guessing that the source for
the combo box does not update itself.
I have seen a solution in another post that looks like it might be the
one, but I don't know how to implement it. This is it:

Rather than doing a Requery, try the built in Response argument.

Response = acDataErrAdded
will tell the combo box that the new item was added and that it
should
requery itself.


Response = acDataErrContinue
will tell the combo box that you're handled the error and it doesn't
need to
do anything. Use this if the user decides what they typed was a
mistake and
they don't really want to add the item.


Where would I put these commands?

Stapes
 
G

Guest

Am I correct in saying you are adding items to a table that you are using as
the source for the combo box?

If so use the "not in list" event then you can add items to the table
automatically through the combo.
 
S

Stapes

Am I correct in saying you are adding items to a table that you are using as
the source for the combo box?

If so use the "not in list" event then you can add items to the table
automatically through the combo.

I am - but not just because they are "not in list" - it is more
complicated than that. I am actually going off and creating a new
customer record, a new item record, and a new job record. Then, when I
return to my front page, I can see the new job in the sub form, but
not the name of the item it refers to. So I can't use not in list - it
is not appropriate here.
 

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