Need event to run when form activates

J

JA

I have an access form. When the user leaves it to use a menu item, I need
to update a label on my form when the user returns to the form. The
Form_Activate event did not work. Is there an event that will trap this?
 
M

mscertified

use the close event on the menu form that you go to.
the other way is to open the menu form in dialog mode then you can update
your label after the 'openform' statement .

-Dorian
 
A

Albert D. Kallal

JA said:
I have an access form. When the user leaves it to use a menu item, I need
to update a label on my form when the user returns to the form. The
Form_Activate event did not work. Is there an event that will trap this?

I don't think there is an event that fires when you using custom (or even
built in) menus.
(I also assuming by menu item...you are taking about a custom or built in
menu option. In fact, if you look at the form, not even the cursor or focus
changes. (this is quite important, since often my custom menu options work
on the current control, and most for sure the current form that active). So,
be it cut/paste etc, it actually quite important that your current focus
does NOT change.

My only suggestion is if your using a custom menu bar, them simply have the
code that the button runs do the form update (your custom menu buttons can
run code in the form, and most of the time that is where the code for the
custom menu belongs anyway). furthermore, your custom menu code will most of
the time pick up the active form + the active control if need be.

Any possibility that the menu option run the code to update the label????

What is it the user doing in the menu that requires you to update a label?
If there is any thing of significance going on here..then you can likely
find a solution here.
 

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