Results 1 to 3 of 3

Thread: Error updating record in bounded form

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    Angry Error updating record in bounded form

    Hi guys I am creating maintenance form to update and add new records to department table.
    But when I try to edit department field in employee table.
    (I get the following error.I get same when try to add new record.)


    http://i5.photobucket.com/albums/y18...department.jpg
    ==> pic of error errroupdatingdepartment

    http://i5.photobucket.com/albums/y18...letionship.jpg
    ===> timekeepingreletionship


    I be happy if some expert help me how to update and add new record to department table successfully without the above error and without changing the db structure.
    Thanks

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Error updating record in bounded form

    I'm no DB expert but your db schema doesnt look right. You dont need Hours Worked or Week tables. A single table for Time_Worked
    or such should do it. The error is coming from referential integrity. Your trying to add a record in one table that depends on another record
    existing in another table. Since it doesnt exist you get the error.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    Talking Re: Error updating record in bounded form

    Quote Originally Posted by RobDog888
    I'm no DB expert but your db schema doesnt look right. You dont need Hours Worked or Week tables. A single table for Time_Worked
    or such should do it. The error is coming from referential integrity. Your trying to add a record in one table that depends on another record
    existing in another table. Since it doesnt exist you get the error.
    Thank u for u reply. is there a way to edit both employee and department tables in the same form at the same time. I be happy if u show me how to do over come this problem without trying to change the db schema.Thanks

Posting Permissions

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



Click Here to Expand Forum to Full Width