Exiting a function upon the closing of a form

K

Katrina

I have my db set up to open 2 forms through visual basic.
If I close the first one while I'm running the code, it
gives me an error that the form is missing, and through
this, I can exit the function.

The problem is that when I open the 2nd form, if the form
is closed, the function doesn't exit. (Or at least this
is what I think. I was led to this conclusion because the
table to which the 2nd form is linked will not let me
change it's design because "a query or form bound to the
table is open. How can I make the function stop if the
form is manually closed?

Also, can I set up buttons to close the form and exit the
function?

(The function is a module, not contained in the form.)

Thanks for any help,
katrina
 
B

Bryan Reich [MSFT]

Katrina,
What is your function doing that places it in an infinite loop so that it
never exits? What operation(s) is it actually performing?
 

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