Thread: Delete command (Access 2000)
2008-07-25, 21:13 #1
- Join Date
- Feb 2002
- 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 ?
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!
+ 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!
2008-07-25, 21:23 #2
- Join Date
- Mar 2002
- Thanked 16 Times in 16 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.