IN THE SPOTLIGHT: MDE to MDB Conversion Service
(also supports: ACCDE to ACCDB, ADE to ADP, etc)
IN THE SPOTLIGHT: vbWatchdog
VBA error handling just got easier...
" vbWatchdog is off the chart. It solves a long standing problem of how to consolidate error handling into one global location and avoid repetitious code within applications. "
- Joe Anderson,
Microsoft Access MVP
Meet Shady, the vbWatchdog mascot watching over your VBA code →
(courtesy of Crystal Long, Microsoft Access MVP)
IN THE SPOTLIGHT: vbMAPI
An Outlook / MAPI code library for VBA, .NET and C# projects
Get emails out to your customers reliably, and without hassle, every single time.
Use vbMAPI alongside Microsoft Outlook to add professional emailing capabilities to your projects.
Provided by Allen Browne, email@example.com. Updated May 2006.
A Customer table is often be related to an Invoice table, on a CustomerID field. To prevent referential integrity problems, database programmers had to write code for every input screen to prevent situations like:
In an Access database, all this code is replaced by a single mouse click when you create the relationship:
That's it! You never worry about referential integrity problems between these tables again.
In the same dialog box, are options for Cascading Update, and Cascading Delete. If you elect to check these boxes, referential integrity is maintained by updating or deleting data in the related table. For example, if you alter a Customer's ID, then all related records are updated to reflect the change.
Referential Integrity is one of Access' strong points, but there is one situation you should consider. A record added to the Invoice table with a blank CustomerID does not violate referential integrity. If you want to use a blank CustomerID (e.g. for a "Cash Sale"), make sure you understand about outer joins or records may appear to slip through the cracks.
Alternatively, block the possibility of a blank CustomerID by opening the Invoice table in Design View and setting its Required property of this field to "Yes". That's another Access mouse click that will save you many lines of validation code! (Not available in Access 1.)
|Home||Index of tips||Top|
This is a cached tutorial, reproduced with permission.
Have your say - comment on this article.
What did you think of 'Referential Integrity can't be that easy!'?
No comments yet.
Why not be the first to comment on this article?!
Have your say...