Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2010

    Unanswered: Force new records in 2 subforms when mainform is activated

    I understand that writing a value to a control in my subforms will open them somehow when my mainform is activated.
    I'm not that advanced so not sure how to write a value. I can use After Update event of the ID control in the main form. I would like the values I write to be the autonumber in ID fields of the 2 subfroms, or the date fields to todays date - but I'm not sure of the syntax.

    Can anyone provide a code example for this After Update?

  2. #2
    Join Date
    Jun 2005
    Richmond, Virginia USA
    Provided Answers: 19
    If you have the main form/subforms set up properly, using the Child and Master Fields properties, Access will do this automatically.

    But the fields on your subforms that relate to the main form's ID field cannot be Autonumbers! The ID on the main form can be an AutoNumber but the foreign keys, which is what the IDs on the subforms would be, in this type of relationship, have to be defined as Numbers - Long Integer.

    Linq ;0)>
    Hope this helps!

    The problem with making anything that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Posting Permissions

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