Order of Events for Multipage Form w/TabControls

TGHockett

Registered User.
Local time
Today, 23:01
Joined
Aug 16, 2000
Messages
65
I have a form with three tab controls as follows:

Tab 1 - main form for proposal specific information
Tab 2 - continous subform to select models to include to include in the current proposal
Tab 3 - a two-part form; the top is single form, and the subform shows the models entered in Tab 2 for entering other cost related information.

This works fine with the major hassel that the subform on Tab 3 doesn't automatically requery to show the records added in Tab 2 until the user starts entering data.

I thought the easy answer was to add a macro to requery the subform on Tab 3 to refresh the data when this tab is selected, but after trying open/enter etc events for both forms on Tab 3, I either get no reaction, or Acc2k says they can't find the control I am trying to reference to update.

One basic quesiton I have is: on this type of multipage form with tab controls -- when do the subforms open? I initially thought all four forms would open when the main form did and I would use the get focus or current events, so all thoughts welcomed...

TGH
 
Thanks Pat -- great idea!

Still curious though if the general rule is that opening the main tab form automatically opens the other forms on the subsequent tabs... guess I will find out
smile.gif


TGH
 
Just wanted to let you know, Pat, that your idea worked just fine, though a bit tedious, as you knew it would be.

For people with this type of problem in the future, a couple of things I learned:

1: The Open/current events fired off just as Acc2k docs said -- the last nested subform (tab 3b)first, then the subform (tab 2), followed by the tab 3a (parent to 3b) and finally by the main form (tab 1).

2: Since I wanted the requery to occur when I selected the third tab, the key was using the "enter" event for that subform, which is only found by viewing the subforms property from the Main form view (not the usual Form view for the subform itself).

3: Even after I pinpointed the right event to use, I still couldn't use the standard requery action since Acc2k refused to acknowledge the subform (3b) when tab 3 was selected.... ironically a simple Sendkeys {F9} did the trick beautifully
smile.gif


Thanks again Pat for pointing me in the right direction!

TGH
 

Users who are viewing this thread

Back
Top Bottom