MS Access 2003 Subform event

Larry Brister
Larry Brister used Ask the Experts™
on
I have a main form (datsheet view) and a subform(also dataseheet view)

Lets say I expand the main form and then expand the subform

When I now click OFF of the subform by clicking in the main form...what event is that?

Form unload?
Lost Focus?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
MIS Liason
Most Valuable Expert 2012
Commented:
Please clarify what is mean by "expand" the forms?

There may be a few events that may actually fire in this case (not just one):
(No in any particular order)
BeforeInsert
AfterInsert
BeforeUpdate
AfterUpdate
Unload
LostFocus
OnExit
OnError
...etc

...and depending on what happened while the form was opened, the order may change

To be sure, put a messagebox on all the form events to see which ones trigger for your specific environment, and each user scenario.

As always, specifying the need for this, and your ultimate goal here, ...is always a big help in getting you the most fitting solution.

;-)

JeffCoachman
Larry Bristersr. Developer

Author

Commented:
JeffCoachman

I'll take a look at that from home tonight.

Believe it or not...they cut us some slack and the programmers can leave an hour early today!
Jeffrey CoachmanMIS Liason
Most Valuable Expert 2012

Commented:
<they cut us some slack and the programmers can leave an hour early today>
I'm in NY and I have to stay 15 more minutes till 5PM...
How to Generate Services Revenue the Easiest Way

This Tuesday! Learn key insights about modern cyber protection services & gain practical strategies to skyrocket business:

- What it takes to build a cloud service portfolio
- How to determine which services will help your unique business grow
- Various use-cases and examples

Larry Bristersr. Developer

Author

Commented:
Thanks
Jeffrey CoachmanMIS Liason
Most Valuable Expert 2012

Commented:
Just to be clear, what was the solution here?
Larry Bristersr. Developer

Author

Commented:
boag2000

You just gave me a clearer understanding of the process.

I placed a messagebox on every type of event and walked my way through a series of issues. (Inherited)

This database has a load of VBA that switches back on itself and I'm removing duplicate code.
Jeffrey CoachmanMIS Liason
Most Valuable Expert 2012

Commented:
OK great.

Yeah, the Messagebox trick is what I use to look at all the events and when they fire, and under what circumstances.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial