Save Yourself Some Work

This month, Doug Steele looks at an undocumented feature within Access that allows you to save Access objects as text files.

Access allows you to save the code associated with a form or module as a text file. Is there a way to do this programmatically?

As it turns out, the answer is yes, but you need to use undocumented methods in the database. As I’ve mentioned in previous columns, there’s always a risk associated with using undocumented features, since they could be changed or removed from one version to another. If you’re willing to take that chance, though, you may find the following interesting. Continue reading

Posted in VBA | Leave a comment

Read this to feel PtrSafe about Office 64 Bit compatibility

If you write Microsoft Access databases with basic VBA code and no fancy Windows calls, you will find your database will run with Office 32 bit and Office 64 bit with no problems. But if you have used fancy windows library calls, you are likely to get this bug

This issue is discussed in detail here at Microsoft and here and Conditional Compilation is discussed here

Better still, here is some code that now works with both Office 32 bit and Office 64 bit VBA



Posted in VBA | Leave a comment

Put XML to Use in Access 2002

You’ve heard that XML is easy to import and export from Access 2002, but you have yet to come up with a good use for it. Danny Lesandrini solves two problems with Access 2002’s XML support: dynamic file linking and moving data across applications.

With Access 2002, Microsoft has provided support for the hottest of new technologies—XML. That’s all well and good, but what use is it? In this article, I’ll show you two different ways that you can use Access 2002 and XML to solve problems. After a quick review of the technology, for instance, I’ll show you how to use XML to re-link files. Continue reading

Posted in VBA | Leave a comment

Properties Without Fear

If you aren’t using DAO’s ability to create new properties, perhaps you should be. Gary outlines a couple of very interesting ways to use this facility to give you more powerful applications.

A simple way to improve your products is by remembering as much as possible about the choices that users made the last time they did something and offering those choices as the default the next time they do the same thing. This information can be stored in a variety of places: INI files, the Registry, or tables in a database. Another convenient storage location can be a database’s DAO Properties collection. Continue reading

Posted in VBA | Leave a comment

Programming WithEvents

By using the WithEvents keyword, you can extend the possibilities of Access’s classes. Marek presents new ideas on programming in Access.

In the Access 97 Developer’s Handbook by Litwin, Getz, and Gilbert (Sybex), there’s an example of how to use the WithEvents keyword with OLE Automation objects like Micrsoft Word. It turns out that this just scratches the surface of what can be done with the WithEvents keyword. Generally, there are six areas where the WithEvents keyword can be used: Continue reading

Posted in VBA | Leave a comment