[AccessD] Update or CancelUpdate Without Addnew or Edit

jwcolby jwcolby at colbyconsulting.com
Mon Sep 21 17:23:42 CDT 2009


 >Voila! Max wins again!

Well, not exactly.  Do the exact same thing only have your subforms reside on the pages of a tab. 
Now as the tab click event fires, load the subform for the correct page, just as you do for your 
buttons.  the difference is that my code is clean, handling one control (the tab control).  Yours 
has to be customized to the number of buttons you have on your form.

Add a subform, add a button, add a button event handler.

In my case, add a subform, just add a tab.  No code change at all.  In fact this is the one lonely 
place where I use the tag property... of the subform control to store the subform to load in that 
subform control.  In the subform control I simply remove the name of the form to load and in the 
OnClick of the tab control I yank the name from the subform control tag and place it back in the 
source property to cause the subform to load.

Works a treat.  Add a tab, drag a subform onto the tab.  Cut the subform name out of the source 
property and place it in the tag.  Instant JIT subform.  Not a single button handler in sight.

Voila... John wins again.  ;)

John W. Colby
www.ColbyConsulting.com


Max Wanadoo wrote:
>> Max, you aren't listening.  
> 
> True.
> 
> I wasn't talking about loading subforms as part of the tabs, but in having
> controls on the tabs screen space.  IOW, one form, no subforms. Main form
> has dozens of tabs each displaying different information from the mainform
> source.
> 
> Break all that out into subforms which load JIT based on buttons. Voila! Max
> wins again!
> 
> Max




More information about the AccessD mailing list