Solved

MS Access 2007 vs 2003 SubForm Event Sequence

Posted on 2008-10-24
9
1,349 Views
Last Modified: 2013-11-28
Hello,
I am opening the same .mdb file on two separate machines. One machine is 2003 version and the other 2007. When I choose a button on a switchboard to open a form in version 2003, it references the subform's event sequence first(even though rs![Argument] in switchboard routine points to main form The db was built on 2003), and this how I want it to run. However, on 2007 the parent form's Form_Load() Event is fired first which causes problems. Why does the sequence of events called differ from the same exact .mdb between versions 2003/2007?

Thank you
0
Comment
Question by:jcampanali
  • 5
  • 4
9 Comments
 
LVL 74

Assisted Solution

by:Jeffrey Coachman
Jeffrey Coachman earned 250 total points
ID: 22800978
jcampanali,

First, I could not duplicate your issue.
I put message boxes on both forms Opening Event Sequences(Open,Load,Resize,Activate,Current)
In both Access 2003 and Access 2007 the subform events fired first.

What happens when you open this form *without* the switchboard in 2003 and 2007.

JeffCoachman
0
 
LVL 4

Author Comment

by:jcampanali
ID: 22801207
Good question, I'm not sure and since I've left work I will have to try on Monday. I thought it to be a 2007 issue. I even went so far as to change the form in the switchboard call to the subform and strangely it called only the Load event skippin over OnCurrent and returning to switchboard code. With 2003 both events are called. And really it's the OnCurrent Event I need to establish data in the subform. Could I call an event from another one as a possible solution?
0
 
LVL 74

Assisted Solution

by:Jeffrey Coachman
Jeffrey Coachman earned 250 total points
ID: 22801915
Yes, but I am not sure it would work.
Because there is the Order of events (That I listed above) that *Must* be followed and cannot be changed.
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 4

Author Comment

by:jcampanali
ID: 22813175
OK, What I noticed when stepping through on the combo box's After_Update event for form  in question(completely by-passing Switchboard) is that the subforms load correctly on 2007 version, however switching from code view to form view shows a superimposed switchboard form(no stops were placed on switchboard). If I run through it in real time, no switchboard form appears, but the sub forms do not populate. I have to re-select from the combo box to populate subform data. After that it's fine as long as the form remains open.
0
 
LVL 74

Assisted Solution

by:Jeffrey Coachman
Jeffrey Coachman earned 250 total points
ID: 22819424
So, ... problem solved?
0
 
LVL 4

Author Comment

by:jcampanali
ID: 22821729
Umm, no because in real time the subform does not populate due the fact that the 2007 version opens main form's events first instead of subform -which is what happens in 2003.
0
 
LVL 74

Assisted Solution

by:Jeffrey Coachman
Jeffrey Coachman earned 250 total points
ID: 22824745
What happens if you make a simple Mainform/Subform in Access 2007, and put messages on all of the Opening events?
(Open, Load, Resize, Activate, Current)
0
 
LVL 74

Assisted Solution

by:Jeffrey Coachman
Jeffrey Coachman earned 250 total points
ID: 22824810
.. a "Real" Mainform/Subform (Customers=Main, Orders=Sub)
0
 
LVL 4

Accepted Solution

by:
jcampanali earned 0 total points
ID: 22869814
I'll revisit later. Too many pressing issues. Thanks
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question