Roger's Access Library Homepage
Forum Home Forum Home > Other Download Libraries > MS Access MVP Libraries > Tejpal, A.D.
  New Posts New Posts RSS Feed - FormsSubformsReference.mdb
  FAQ FAQ  Forum Search   Events   Register Register  Login Login


Please consider donating $1 per sample downloaded, (find out why here)

FormsSubformsReference.mdb

 Post Reply Post Reply
Author
Message
A.D. Tejpal View Drop Down
Microsoft MVP
Microsoft MVP


Joined: 30 Jun 2008
Status: Offline
Points: 192
Post Options Post Options   Thanks (0) Thanks(0)   Quote A.D. Tejpal Quote  Post ReplyReply Direct Link To This Post Topic: FormsSubformsReference.mdb
    Posted: 08 Jul 2008 at 10:50pm
This sample db demonstrates execution of following types of tasks while 
simultaneously displaying the code involved:

 -Referring to controls of one group of nested subforms from another group of 
  nested subforms:
        (a) There are two adjacent sets of nested subforms, each three levels deep.
        (b) Dbl clicking any text box identifies it as Target Control. Thereafter, Dbl 
             clicking any other text box identifies it as Base Control.
        (c) Code in the subform containing Base Control, acts upon Target control and 
             also sets focus on to it. Simultaneously, this code gets displayed at bottom 
             of main parent form.
        (d) For each situation, two alternative styles of VBA code are shown (with and 
             without use of bang (!) operator).
        (e) Extreme case involves Base Control in innermost nested subform at left, 
             acting upon Target Control in innermost nested subform at right (i.e. going 
             up-hill across three levels of parent forms and then down-hill across three 
             levels of subforms).
     4.3 - (i) Query using values represented by controls on forms / nested subforms, 
             (ii) Referring to subroutines (contained in form's modules)  across various 
                  levels of nested subforms:
                 (a) Here too, two adjacent sets of nested subforms, each three levels 
                      deep are used.
                 (b) Dbl clicking any text box on main parent form or various nested 
                      subforms at left, causes its value to be picked up by the query, results 
                      of which, are displayed in the innermost nested subform at right.
                 (c) Simultaneously, the SQL used in source query, gets displayed at 
                      bottom of parent form.
                 (d) VBA code used for calling a subroutine contained in the module of
                      innermost nested subform at right, from various levels of nested 
                      subforms at left, is also displayed.
 
    Note - 
        (a) In a query, reference to form controls is feasible only by using bang (!) 
             operator. 
        (b) In VBA code, parenthesis can be used in lieu of bang (!) operator and are 
             preferred. 
        (c) Thumb rule: Use Dot for one to many situation. Use bang (!) or parenthesis
              for many to one situation e.g member of a collection.

Download Access XP & 2K: uploads/37/FormsSubformsReference.zip

--

Email: adtejpal@gmail.com
Back to Top
Sponsored Links


Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down