How do I prohibit new records in subform?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mgoodman
    New Member
    • Mar 2008
    • 1

    #1

    How do I prohibit new records in subform?

    I have a main form w/ two subforms in Access. Based on their parent/child fields, the subforms call up existing matching records. My problem is: when there is no matching record in my subform it automatically creates a new record and populates it with whatever is entered in the parent field on the main form. I would like the user to be able to add and edit records on the main form regarless if there is a match on the subform or not. When there is a matching child record in the subform, I would like the user to be able to edit those fields.

    I don't think I can use referential integrity to control this because my main form has many (duplicate) records and this is the 'parent' field in the link (i.e. a one-to-many relationship).

    Any tips?

    - mgoodman
  • FishVal
    Recognized Expert Specialist
    • Jun 2007
    • 2656

    #2
    Hi, mgoodman.

    Actually, I could hardly imagine SubForm control creating new record automatically. Do you have any code behind?

    Regards,
    Fish

    Comment

    Working...