Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2003
    Location
    Guelph, Canada
    Posts
    39

    Unanswered: Form design help

    I have a table that I'd like to base a form on.
    I'd like the form to have a subform and have both form/subform viewed in *datasheet* view.

    The form would list the records from the table (in datasheet view) and when a record would be entered in the form, the subform would pull up all related records (related by NameID).

    Guidance on how to set this up would be much appreciated!

    TIA Eric

  2. #2
    Join Date
    Apr 2003
    Location
    Santa Barbara, CA
    Posts
    67

    Re: Form design help

    Originally posted by Noops
    I have a table that I'd like to base a form on.
    I'd like the form to have a subform and have both form/subform viewed in *datasheet* view.

    The form would list the records from the table (in datasheet view) and when a record would be entered in the form, the subform would pull up all related records (related by NameID).

    Guidance on how to set this up would be much appreciated!

    TIA Eric
    Use an unbound form (a new form but don't attach a table to it). Place two subform objects on it. One with your Parent table(PT) as the Source Object and the other with the dependent table (DT) as the Source Object. In the property list for the dependent table property, name the tables key field or linking field (NameID) in the Link Child Fields property. In the Link Master Fields name the Parent table subform object, bang, and corresponding field (PT!NameID). The dependent table subform then needs to be requeryed. Use a command button (on click me!DT.requery)

    I am not sure how the dependent table knows that there are cooresponding records before the parent table record is created. (You said "when the record would be entered in the form"). Is there are a third/Master table ?
    Last edited by Robt917; 04-11-03 at 14:25.

  3. #3
    Join Date
    Jan 2003
    Location
    Guelph, Canada
    Posts
    39
    Thanks for your reply Rob,

    > I am not sure how the dependent table knows that there are cooresponding records before the parent table record is created. (You said "when the record would be entered in the form"). Is there are a third/Master table ?

    I have several tables but the main ones are a Detentions table, User table and Student table. The main form would be the conduit to enter new records in the detentions table. The first control in the main form would pull up all matching (studentID) detention records in the subform.
    Both form and subform would look essentially the same in design (same as the Detentions table).

    Eric

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •