Calling Message form while code is running

G

Guest

My predecessor set up code as follows:

1. Menu Item has click event which calls User Question form.
2. Question Form has click event which calls message form.
3. Message form Displays message ie "Please wait while Processing is Being
Done"
and in the Timer event of that form contains the function call to do
processing. The timer interval is set to 1000.

Isn't this an incorrect method, since the code should only execute once, and
the timer would have it continually execute ?

Also, if you wanted to keep the same method of coding, calling up forms to
gather user information and display work in process messages, could it be
done by leaving item #1 as is and in #2 code something like this in the click
event:

DoCmd.Openform("Processing Message")
Execute function to process data
DoCmd.Close

I tried the above code but it didn't seem to function correctly. The
processing message should cancel out the form in item # 1, then when the
function to process data is complete, all forms should close and return to
the main menu.

Thanks.
 
M

Marshall Barton

rmcompute said:
My predecessor set up code as follows:

1. Menu Item has click event which calls User Question form.
2. Question Form has click event which calls message form.
3. Message form Displays message ie "Please wait while Processing is Being
Done"
and in the Timer event of that form contains the function call to do
processing. The timer interval is set to 1000.

Isn't this an incorrect method, since the code should only execute once, and
the timer would have it continually execute ?

Also, if you wanted to keep the same method of coding, calling up forms to
gather user information and display work in process messages, could it be
done by leaving item #1 as is and in #2 code something like this in the click
event:

DoCmd.Openform("Processing Message")
Execute function to process data
DoCmd.Close

I tried the above code but it didn't seem to function correctly. The
processing message should cancel out the form in item # 1, then when the
function to process data is complete, all forms should close and return to
the main menu.

In genral, I agree with you.

However, there may be something tricky going on, so I can't
be sure that the convoluted logic doesn't work correctly.

Not sure what you mean by "processing message should cancel
out the form", but it doesn't sound right.

Note that you should close each form explicitly by using:
DoCmd.Close acForm, Me.Name
and/or
DoCmd.Close acForm, "nameofform"
 

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