E.7. The CurrentData Object

The CurrentData object is used to refer to all of the objects stored in the current database by the server application (either Jet or SQL). The properties associated with the CurrentData object are the same as those for the CodeData object. So what's the difference? Well, it's just one word. If you re-read the definitions of both you'll notice one key difference. The CurrentData object allows you to manage the objects in the current database. The CodeData object takes care of the objects in the code database. The code database is a database used as a reference for the current database. For example, if you have a database called Samples.mdb, and that database contains a reference to a database called VBASamples.mdb, the current database would be Samples.mdb and the code database would be VBASamples.mdb. The properties and methods of the CurrentData object are the same as the CodeData object, so we won't cover them separately here.

Get Access 2003 VBA Programmer's Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.