Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2014
    Posts
    21

    Restrictring records added in the subform to the current record in the main form


    This must be a simple problem, it's just that I can't find a direct way to solve it.

    I have a One-to-many relationship, a form with the One table and the subform with the Many table. I want to add records in the subform and I expect the form to recognize they are pertinent to the current record in the One side. Problem is, when I add the record in the subform it always set the field referencing the One table to zero and I want it to automatically restrict it to the current value in the main form.

    Is there a way to limit the record automatically without code?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    The master/child link properties of the subform control are what typically keep the 2 in sync.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Join Date
    Jan 2014
    Posts
    21
    Ok, I have set those two and I stopped having the issue. Now the field is automatically set as I write the input for the other fields.

    Thanks.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    No problem.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 6
    Last Post: 05-18-2013, 12:48 AM
  2. Replies: 2
    Last Post: 05-02-2012, 09:16 PM
  3. Replies: 11
    Last Post: 02-13-2012, 10:06 AM
  4. New record not being added to main form
    By hmcquade in forum Forms
    Replies: 10
    Last Post: 07-21-2011, 10:07 AM
  5. Replies: 4
    Last Post: 05-17-2011, 06:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums