Alison Balteramp;#039;s Mastering Microsoft Office Access 1002003 [Electronic resources]

Alison Balter

نسخه متنی -صفحه : 544/ 457
نمايش فراداده

Detecting Broken References

Prior to Access 2002, it was difficult to locate and diagnose broken references. Access 2002 and Access 2003 offer BrokenReference, a new property of the Application object that rectifies this problem. If broken references exist, the property evaluates to True. If no broken references exist, it evaluates to False. Querying the BrokenReferences property is much more efficient than looping through each reference to determine whether it is intact. The code looks like this:

Sub DetectBrokenReference() 'Display whether or not database contains a broken reference MsgBox Application.BrokenReference End Sub