Results 1 to 2 of 2
  1. #1
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    NJ, USA
    Posts
    617
    Thanks
    0
    Thanked 0 Times in 0 Posts
    When I add a new record I want a subform to automatically add each of it's active units. A new record is a new date. The subform is based on a table of units. If the units are active I want all of the active units to automatically be created in the subform.
    So tomorrow when I create the 3/1/2009 date I want the sfrm to automatically show 2-North, 3-North, ICU etc. Each of these units are a new record on the datasheet.

    How do I do that?

    Thank you. Fay

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    [quote name='Fay Yocum' post='762539' date='01-Mar-2009 01:26'][/quote]
    I'd disallow the users to create a new record in the main form by setting the AllowAdditions property to No.

    I'd create a separate unbound form in which the user can enter some data for a new record.
    Place a command button on the form whose On Click event procedure adds a new record to the table behind the main form and saves it, then adds records to the table behind the subform; this can probably be done by running an SQL statement with INSERT INTO.

    If you would like more help, please provide detailed information and/or attach a stripped down and zipped database.

Posting Permissions

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