Results 1 to 2 of 2
  1. #1
    4 Star Lounger
    Join Date
    Feb 2002
    Posts
    537
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Delete command (Access 2000)

    I have a forn and a subform for clients.The subform describes the visits to the clients.I want to make my delete command perform so, that to delete only when there are no entries in the subform.In my applied example there is an entry for the customer and the comman should not delete it.Can i do it ?

  2. Subscribe to our Windows Secrets Newsletter - It's Free!

    Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 15 Times in 15 Posts

    Re: Delete command (Access 2000)

    Activate the Relationships window.
    Make sure that there is a relationship between the clients table and the visits table.
    Double click the join line, and tick the check box "Enforce referential integrity", but do *not* tick the check box "Cascade delete related records". Then click OK.

    You won't be able to delete clients as long as they have at least one visit record.

Posting Permissions

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