Programmatically close a modal popup form

G

Guest

Hello,

I have a command button on a form that popsup another form (set to modal).
I would like the form to close when the keyer leaves the last field on the
form instead of cycling back through the fields. The regular doCmd.Close or
doCmd.RunCommand gives me an error that this "the command cannot be carried
out while processing a form or report."

Any suggestions appreciated.

Thanks
Bonnie
 
J

J

Have you tried making a new control and setting it as the last in the
tab order. Set everything about the control to invisible/transparent.
Make sure the control is unbound. In the control's gotfocus event, do
the close.

Hope that helps,
~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