Using notinlist event to open form pass values

G

Guest

I have a subform that has a combo box. When someone enters an item not in
list I would like to open a custom form (which I created) and allow the user
to fill it in with the new data.

Here's the tricky part. Once the custom form is closed I would like the new
information to be my new value in the subform. I'm having trouble figuring
how to refresh the combo box and cause that value to placed there.

Is there a way to suspend my "notinlist" code and have the custom form be
modal and then refresh my combo once the form is completed or canceled?
 
G

Guest

When you open the form, open it as Dialog, and then run the requery.
the code will stop until you close the form, and then it will run the requery

DoCmd.OpenForm "FormName", , , , , acDialog
Me![comboName].Requery
 
G

Guest

ah yeah!

thanks!

Ofer Cohen said:
When you open the form, open it as Dialog, and then run the requery.
the code will stop until you close the form, and then it will run the requery

DoCmd.OpenForm "FormName", , , , , acDialog
Me![comboName].Requery

--
Good Luck
BS"D


C Hayes said:
I have a subform that has a combo box. When someone enters an item not in
list I would like to open a custom form (which I created) and allow the user
to fill it in with the new data.

Here's the tricky part. Once the custom form is closed I would like the new
information to be my new value in the subform. I'm having trouble figuring
how to refresh the combo box and cause that value to placed there.

Is there a way to suspend my "notinlist" code and have the custom form be
modal and then refresh my combo once the form is completed or canceled?
 

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