Appending to a subform table which is linked to a autonumber

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bcarson86
    New Member
    • Mar 2008
    • 2

    Appending to a subform table which is linked to a autonumber

    Hi,
    I am trying to append a list of part numbers which is generated in a seperate table into a subform table which is on a main form. My main problem with getting it to work is that I need the part numbers to be appended to the subform table after the autonumber (audit no) has already been assigned on the form which is done by hitting the new audit button(creates new record). Critically the part numbers need to be appended to match the autonumber generated on the main form. Appending normally would just append to the table with autonumber on 0.

    Any help would be greatly appreciated.

    Cheers,
    Ben
  • nico5038
    Recognized Expert Specialist
    • Nov 2006
    • 3080

    #2
    When you create a new "main" record, adding linked sub-records can be nasty.
    Personally I create the main record by code "in advance", thus making it an existing record and then adding is "standard".
    The "price to pay" is the fact that when the user cancels the insert of the main record, it has to be deleted :-)

    Nic;o)

    Comment

    • bcarson86
      New Member
      • Mar 2008
      • 2

      #3
      thanks Nico,
      i got around the autonumber audit number problem anyway by just appending a new audit number which was (Max +1) of the the audit number field, with other data which is appended.
      Ben


      Originally posted by nico5038
      When you create a new "main" record, adding linked sub-records can be nasty.
      Personally I create the main record by code "in advance", thus making it an existing record and then adding is "standard".
      The "price to pay" is the fact that when the user cancels the insert of the main record, it has to be deleted :-)

      Nic;o)

      Comment

      Working...