Results 1 to 7 of 7
  1. #1
    Brightspark98 is offline Advanced Beginner
    Windows 7 64bit Access 2013 32bit
    Join Date
    Dec 2016
    Posts
    57

    Stuck Again - Relationships?

    Can anyone help with this one please. I get the following error message when I try to input a record.
    Many Thanks.
    Click image for larger version. 

Name:	First Aid Table.jpg 
Views:	14 
Size:	101.4 KB 
ID:	27131

  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
    It sounds like you've enforced referential integrity, which would require that whatever you enter/choose in the injury type field in FAReport must exist in tbl_FAInjury already. Alternatively, you can use the not in list event of a combo to add it on the fly.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,398
    with the relationships you have structured, the message is telling you you cannot add a record to FAReport until all the fields linked to other tables have been completed with a valid value (i.e. one that exists in the relevant parent table. You cannot leave any of them blank - there may be others but the message is referring you to the InjuryTypeID

  4. #4
    Brightspark98 is offline Advanced Beginner
    Windows 7 64bit Access 2013 32bit
    Join Date
    Dec 2016
    Posts
    57
    Hi,
    I've removed enforce referential integrity and all works now. Is this likely to cause any problems?

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Access no longer protects you from users entering whatever they want. You can end up with Acme Co, Acme Company, Acme Comp, etc.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    Brightspark98 is offline Advanced Beginner
    Windows 7 64bit Access 2013 32bit
    Join Date
    Dec 2016
    Posts
    57
    So if my inputs are via combo - limited to list it should be ok?

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Yes, though you face the same problem of the value needing to exist already, unless you add code to the not in list event. Searching here for "notinlist" should turn up the code if you need it.
    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: 2
    Last Post: 07-27-2016, 10:25 AM
  2. table relationships and business rules - I'm stuck!
    By sansui88 in forum Database Design
    Replies: 3
    Last Post: 03-03-2014, 04:01 PM
  3. Stuck with my relationships!
    By davewilldo in forum Access
    Replies: 7
    Last Post: 12-08-2013, 07:53 AM
  4. Stuck with relationships
    By thecritter99 in forum Database Design
    Replies: 2
    Last Post: 02-22-2012, 07:21 AM
  5. Relationships/Joins/Forms STUCK
    By cooper in forum Forms
    Replies: 4
    Last Post: 08-04-2011, 02:21 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