Access 2K: Refresh Combo Box after adding new data from another fo

J

Just Jez

Hi

I have a form populated by a filtered query so users can add missing data.

One part of the form has a combo list box populated from another query and
sort alphabetically.

The user can pick from list or if not in list, a not in list message comes
up and askes if they want to add the new data, if yes a form opens up based
on the table based on the combo box query and they fill in relevant data.
They need to fill in several required fields. On closing this form I want to
refresh the first form and the combo box on that form so to show new data
just entered.

I really do not want to close the first form and then re-open it.

The first form stays in edit mode when second form opens. How can I get the
form out of that mode?

I think this might solve it so I can then refresh form etc.

If you have any other ideas I would be greatful.

Regards
 
M

Marshall Barton

Just said:
I have a form populated by a filtered query so users can add missing data.

One part of the form has a combo list box populated from another query and
sort alphabetically.

The user can pick from list or if not in list, a not in list message comes
up and askes if they want to add the new data, if yes a form opens up based
on the table based on the combo box query and they fill in relevant data.
They need to fill in several required fields. On closing this form I want to
refresh the first form and the combo box on that form so to show new data
just entered.

I really do not want to close the first form and then re-open it.

The first form stays in edit mode when second form opens. How can I get the
form out of that mode?


The usual way to do this is to open the second form in
Dialog mode. The set the NotInList event's Response
argument to acErrDataAdded. This will not affext the first
form, but it will requery the combo box and recheck if the
new entry is now in the list. Check VBA Help for details on
NotInList Event
 
J

Just Jez

Marshall Barton said:
The usual way to do this is to open the second form in
Dialog mode. The set the NotInList event's Response
argument to acErrDataAdded. This will not affext the first
form, but it will requery the combo box and recheck if the
new entry is now in the list. Check VBA Help for details on
NotInList Event
Thanks Marsh,

Was going around in circles, and with my workload sometimes I forget the
easy way forward and dont do the obvoius. Look it up in VB Help.

Thanks again for the pointer will look at this a little later. Hope it will
do what I want it to do, looks like it will.

Cheers, J
 

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