Results 1 to 3 of 3
  1. #1
    jerem is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2012
    Posts
    88

    Error 3201 on Form / Subform

    Hi,
    I have a Form [Quotes] and a Subform [QuoteDetails]. In my form I created a dropbox with an AfterUpdate event to append new records in the [QuoteDetails] table automatically. The problem is that since my code creates the records directly in the table without going through the form, there is no record created at the parent level, the [Quotes] table. Therefore my record in the child table [QuoteDetails] cannot be created.

    The error is: Run-time error '3201':
    You cannot add or change a record because a related record is required in table 'Quotes'

    Any work around?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    Options:

    1. don't enforce referential integrity in table relationships

    2. save parent record first
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    jerem is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2012
    Posts
    88
    Thanks June!

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

Similar Threads

  1. Form/Subform commit row error
    By jbickl in forum Forms
    Replies: 2
    Last Post: 03-31-2012, 07:19 PM
  2. Error with my subform
    By gcommservices in forum Forms
    Replies: 1
    Last Post: 12-29-2011, 01:47 PM
  3. Form works, Subform gets error
    By jlclark4 in forum Forms
    Replies: 9
    Last Post: 01-03-2011, 09:24 AM
  4. Form and Subform error trapping
    By usmcgrunt in forum Forms
    Replies: 8
    Last Post: 09-12-2010, 11:54 AM
  5. Replies: 4
    Last Post: 05-17-2010, 05:32 PM

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