Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2004
    Posts
    5

    Unanswered: multiple subforms input into one table?

    hi, all. i was initially creating a massive form that inputted data into a few different tables, but i ended up with too many controls for the form to open and the form itself (upon deleting a few controls) ran really slowly.

    i thought i'd solved the problem by creating subforms based upon queries (all of which query the same table(s) and placing them on different page tabs on the master form, with the master form on every tab having the primary key (date) entry control.

    now if i move from one tab to the next, i get the "you idiot you've already entered that pkey value" error when in fact i just want each subform to enter data into the specified fields of a singualr record, specified, of course, by the pkey control outside the subforms...

    is this even possible / the intended purpose of subforms? i'm learning access on the fly, and, alas, have no programmatic experience. any help you can provide would be awesome, and i hope i've outlined my dilemma clearly enough. thanks, patrick

  2. #2
    Join Date
    Oct 2004
    Posts
    12

    Post

    Please help me,
    I have a table called tblDBN which contains a date field called [FMending] that was used to generate a query QryDBN and a report [RptDebit Note]

    When I run the report, it is suppose to call up a form frmDBN, and I will enter two Date variables ie. txtdate1 and txtdate2. which links up with QryDBN and are now used as a criteria to filter for all dates below the dates entered on the form in tblDBN[fmending]

    My problem is how to relate the form with the filtered query and generate report.

    Thank you for your response
    Florence

  3. #3
    Join Date
    Oct 2004
    Location
    Oxfordshire, UK
    Posts
    89

    Post

    Grouping related data on tab control pages is a good idea. Creating subforms which refer to the same data is not.
    1. Create you tab control in a new form.
    2. Refer to one table in the Form.RecordSource.
    3. Drop bound controls on to seperate tab pages to group the record data.
    If the RecordSource is a child recordset the the new form can be used as the source for a subForm control in a form referring to the parent recordset. This could even be in on a tab page! There are performance issues if you repeat this but it allows you to place a tab control within a tab control (not possible directly).

    Also:
    1. Make sure all linked tables are really linked i.e. have relationships.
    2. Don't create queries which refer to parent and child recordset tables and make then the record source for a child recordset subform - all hell will break loose!
    3. Check Link Child/Master field properties of the sub form control. Access tries to be intelligent but...
    Have Fun


    Ian


  4. #4
    Join Date
    Oct 2004
    Location
    Oxfordshire, UK
    Posts
    89
    Quote Originally Posted by pjwoods
    hi, all. i was initially creating a massive form that inputted data into a few different tables, but i ended up with too many controls for the form to open and the form itself (upon deleting a few controls) ran really slowly.

    i thought i'd solved the problem by creating subforms based upon queries (all of which query the same table(s) and placing them on different page tabs on the master form, with the master form on every tab having the primary key (date) entry control.

    now if i move from one tab to the next, i get the "you idiot you've already entered that pkey value" error when in fact i just want each subform to enter data into the specified fields of a singualr record, specified, of course, by the pkey control outside the subforms...

    is this even possible / the intended purpose of subforms? i'm learning access on the fly, and, alas, have no programmatic experience. any help you can provide would be awesome, and i hope i've outlined my dilemma clearly enough. thanks, patrick
    Grouping related data on tab control pages is a good idea. Creating subforms which refer to the same data is not.
    1. Create you tab control in a new form.
    2. Refer to one table in the Form.RecordSource.
    3. Drop bound controls on to seperate tab pages to group the record data.
    If the RecordSource is a child recordset the the new form can be used as the source for a subForm control in a form referring to the parent recordset. This could even be in on a tab page! There are performance issues if you repeat this but it allows you to place a tab control within a tab control (not possible directly).

    Also:
    1. Make sure all linked tables are really linked i.e. have relationships.
    2. Don't create queries which refer to parent and child recordset tables and make then the record source for a child recordset subform - all hell will break loose!
    3. Check Link Child/Master field properties of the sub form control. Access tries to be intelligent but...
    Have Fun


    Ian

  5. #5
    Join Date
    Oct 2004
    Posts
    5
    thanks for your reply, ian. i'll see what i can do.

    -patrick

Posting Permissions

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