Problem in Access 97 Using Forms and Sub Forms


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Problem in Access 97 Using Forms and Sub Forms

  1. #1
    Barend Esterhuizen Guest

    Problem in Access 97 Using Forms and Sub Forms

    Hi there,
    Can anyone help me with some information on how many sub forms I can add to
    on main form and how I would go about to interlink these forms to each
    other. For lets say the main forms ID must link to the first Sub forms ID,
    the First Sub Forms Control Key must Link to the second Forms Control key
    and so on.
    Any help would be greatly appreciated, thanks,
    --
    Barend



  2. #2
    Ted McNeal Guest

    Re: Problem in Access 97 Using Forms and Sub Forms


    Barend,

    You can nest subforms up to 3 times. In other words you can place a sub
    form into another up to 3 times. You can link the subforms by selecting
    the relationship between the parent (main form or upper level subform) and
    the child subform by using the Link Master Fields and Link Child Fields.
    If you are linking the forms w/ more than one field then you must delimit
    the fields using a semicolon (i.e. ParentID;ParentEvent).

    Access will handle the requerying of the subforms when you move records on
    the parent form.

    As for the number of subforms on a form. The subform is a native access
    control. Hence, you are limited by the number of controls that you can place
    on a given form. Yet, it is good practice to use a control to select the
    desired subform that you want to view. This also saves screen real estate.
    You can use a tab control to do this. Use the onchange event to set the
    sourceobject property of the subform control to the name of the form that
    you would like to place in the subform. This works better than placing all
    of the subforms on the screen and showing and hiding them appropriately because
    you can load the subforms (and recordsets) on demand.

    Ted



    "Barend Esterhuizen" <d.esterhuizen@intekom.co.za> wrote:
    >Hi there,
    >Can anyone help me with some information on how many sub forms I can add

    to
    >on main form and how I would go about to interlink these forms to each
    >other. For lets say the main forms ID must link to the first Sub forms ID,
    >the First Sub Forms Control Key must Link to the second Forms Control key
    >and so on.
    >Any help would be greatly appreciated, thanks,
    >--
    >Barend
    >
    >





Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center