Subform OnEnter event triggered

N

NetworkTrade

I have code in a subform's On Enter and On Exit events...that seem to be
firing when the form opens....

I was thinking these only fired when one tabbed into the field or tabbed out
of the field.....

Can someone confirm? thnks
 
S

scubadiver

If you are using the subform properties then it will do what you have asked.
If you want to use the field then you have to use *its* on enter and exit
events!
 
N

NetworkTrade

I re-read my own question and realize that I did not explain it accurately.

I have vba in the OnEnter and OnExit events of a control field which is
within a subform.

When the subform opens (which occurs when the main form opens) - the vba is
firing. (To be completely accurate - this control is not visible by design.
And made visible by selection of user. So thinking while I type, I suppose
it could be firing on the make visible action though I would guess not....)

When the control is visible - it has performed math per the vba - much to my
surprise. I had been thinking that OnEnter OnExit required a mouse click or
tab into/out of.....

Have had no choice but to pull out that VBA and put over in a 'calc'
button...but would like to get a better understanding of the underlying
fundamentals...have searched about the site but can't find a succinct
explanation of what fires when a subform opens.....experimented briefly with
moving to OnFocus event and had same problem....
 
S

scubadiver

So whats the question? :)


NetworkTrade said:
I re-read my own question and realize that I did not explain it accurately.

I have vba in the OnEnter and OnExit events of a control field which is
within a subform.

When the subform opens (which occurs when the main form opens) - the vba is
firing. (To be completely accurate - this control is not visible by design.
And made visible by selection of user. So thinking while I type, I suppose
it could be firing on the make visible action though I would guess not....)

When the control is visible - it has performed math per the vba - much to my
surprise. I had been thinking that OnEnter OnExit required a mouse click or
tab into/out of.....

Have had no choice but to pull out that VBA and put over in a 'calc'
button...but would like to get a better understanding of the underlying
fundamentals...have searched about the site but can't find a succinct
explanation of what fires when a subform opens.....experimented briefly with
moving to OnFocus event and had same problem....
 
D

Dymondjack

NetworkTrade,

I don't believe I have an answer to your question, though I have recently
come across the same problem in different events myself (mainly on the
opening and updating of forms). After spending many hours searching for a
layout of what order that access processes all of the events under given
circumstances, I finally figured I'd do it on my own.

What I have started to do (this might take me a little while) is set up a db
that has many of the common form/subform/open and go to recs/ect. ect. in it,
with no underlying code except a msgbox under each event that fires, giving a
description of what event is firing. These messages set in a dialog mode
should tell what order all of the events fire under.

To second the question, if there is by any chance a record of how this works
that someone may have already done, by all means please reply, as I'm sure it
would be a great help to many of us. In the meantime, it might take me a
couple of weeks or a couple of months, but when I do get this test db setup
for checking the exact order for event firing, I'll be sure to post a thread
in here with a link too it.

Good luck!

Jack
 
N

NetworkTrade

thanks for reply.

In my faulty memory cells I think I remember a dialog that I read between
someone and an MVP where the MVP did lay out the summary of what fires when a
subform opens.....because I remember thinking that this was interesting - -
but failed to copy that info into a folder......now can not refind that
dialog.

As part of your research; you might repost a new question asking an MVP to
explain .....possibly the answer is available.....it seems this dialog did
not get mvp review perhaps....

I don't monitor the web site so I'll miss the reply - if you don't mind
sending it to me it would be much appreciated; (e-mail address removed)
thanks
 

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