Results 1 to 2 of 2
  1. #1
    joe1987 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Oct 2011
    Posts
    15

    Can't delete records

    Hi,
    I have my subforms joined in to tabbed form. Can I somehow make that 'delete' button will delete all records in the database related with the same ID? Other problem is - when I press delete record it doesn't allow me to delete, cause there're relationships between different tables.


    DB sample below:
    http://www.2shared.com/file/gizRTHdB..._version_.html

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,526
    I haven't looked at the sample, as I don't download from unknown websites. Offhand, two thoughts/methods. In your relationships, you can use Cascade Delete in Referential Integrity. That would delete all sub records when the main record is deleted. You can also use code to grab the ID and then run delete queries on each sub table and then on the main table using that ID as a criteria.
    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. Delete Records
    By dkeeper09 in forum Access
    Replies: 4
    Last Post: 10-28-2011, 01:41 PM
  2. Delete all records
    By stryder09 in forum Access
    Replies: 6
    Last Post: 05-11-2011, 02:07 PM
  3. delete records
    By fiamma68 in forum Queries
    Replies: 0
    Last Post: 11-15-2010, 06:54 PM
  4. #delete records
    By supernova122 in forum Access
    Replies: 0
    Last Post: 07-08-2009, 08:41 AM
  5. Delete all records in a table?
    By bob646 in forum Access
    Replies: 1
    Last Post: 05-20-2007, 11:41 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