When you try to open a database, you may encounter this error message: Could not use [Database Name]; file already in use.
This error occurs if another user (or instance of Access) has opened up the database exclusively and you try to open it. Maybe the other user opened the database in exclusive mode or made some modifications such as editing modules, which put the database in exclusive mode.
However, that may not be the case. This error can occur even if the other user has the database opened without opening it exclusively. What’s going on? Why would the second instance think it’s being opened exclusively?
What if the Other User isn’t Opening it Exclusively?
It turns out that another cause of this error is not immediately obvious and is related to workgroup security files. This applies to MDB files (not ADP or ACCDB formats). If two instances of Microsoft Access (DAO database engine) are using different system MDW files, a conflict may occur where the database appears to be exclusively locked by the other instance. The MDW file used by your instance of Access can be checked in VBA by examining the value of DBEngine.SystemDB.
Another copy of Access or DAO may have that database opened using another MDW file causing this conflict. This can come from another instance of MS Access, a Microsoft Access add-in or library reference, a VBA Add-in, or other program such as VB6, .NET, etc. that’s connecting to that database.
To avoid this, if you’re using workgroup security, make sure every instance is pointing to the same shared MDW file. This is often defined in the shortcut used to launch Microsoft Access, or if you are opening a different database programmatically within your VBA code.
If you’re interested in seeing who’s going in and out of your database in real-time, check out our Total Access Admin program. It’ll let you monitor multiple databases across your network to see when users enter and exit your database and flag instances where connections are dropped suspiciously.
Please join FMS President Luke Chung at the New York Microsoft Access User Group Meeting on September 10, 2012 at 6:30PM.
Luke Chung is the featured presenter at this New York City event hosted at Microsoft Headquarters located at 1290 6th Ave., between 51st and 52nd Streets.
Luke will discuss and demonstrate FMS products for Microsoft Access, Azure cloud computing, plus answer any questions you may have about his experiences. There will also be product giveaways to members of the user group.
On August 14, 2012, Microsoft released a security update for Microsoft Office that includes an update to the Windows Common Control MSCOMCTL.OCX.
Unfortunately, this update causes problems with existing Microsoft Access, Visual Basic 6, and other applications that use the common control such as the Treeview and ListBox controls. For us, this impacts our Total Access Analyzer program which uses the Treeview control in its database explorer feature. It triggers this error:
Total Access Analyzer is the most popular Microsoft Access product of all-time! Documenting and analyzing your database objects, macros and VBA module code, Total Access Analyzer helps you understand what's going on. Take control of your MS Access applications and find errors and ways to improve their design and performance. Over 300 issues are pinpointed with 380 presentation quality reports for comprehensive documentation and cross-referencing of your application. Winner of every Best Microsoft Access Add-in award with great reviews, Total Access Analyzer remains the "Must Have" tool for serious Microsoft Access developers and people who inherit existing Access solutions.
Here’s a response to a question about the standards we implement for our Microsoft Access applications. These are some fundamentals for ensuring a solid foundation for professional Access solutions in priority with some resources related to them:
Split Database Design. Without this, it’s nearly impossible to enhance the database while others are changing the data.
Cleaning up VBA code. From code indentations to applying our variable naming conventions along with prefixes for global vs. module vs. procedure, and constants vs parameters vs. regular variable names. We use the Code Cleanup feature of Total Visual CodeTools to do this. Personally, without cleaning it up to our standards, I find it nearly impossible to get any work done while I’m struggling with someone else’s convention.
Setting up a development, testing and deployment process so changes can be implemented safely and efficiently. Lots of issues around this but having a fast, stable way to manage changes and how people launch the Access application is critical. We use our Total Access Startup program to help with this.
After these structures are in place, we’re ready to run Total Access Analyzer against the database to address the issues it finds wrong and could be improved in the application.
Microsoft has officially designated FMS President Luke Chung as a Microsoft MVP for supporting the Microsoft Access community.
Since the official launch of Microsoft Access twenty years ago, Luke Chung has been at the forefront of the Microsoft Access community (read his impression on the day Microsoft Access debuted). He has written numerous articles, spoken at conferences around the world, and collaborated with the Microsoft Access development team over the years. His leadership propelled FMS to the world’s leading developer of commercial products for Microsoft Access with tens of thousands of customers in 100+ countries.
While there are more than 100 million social and technical community members, only a small portion are selected to be recognized as Microsoft MVPs. Each year, around 4,000 MVPs are honored. 982 were recognized on July 1, including Luke. These individuals were chosen because they have demonstrated their deep commitment to helping others make the most of their technology, voluntarily sharing their passion, and real-world knowledge of Microsoft products with the community. Candidates are rigorously evaluated for their technical expertise, community leadership, and voluntary community contributions for the previous year. They come from more than 90 countries, speak over 40 different languages, and are awarded in more than 90 Microsoft technologies. Microsoft Announcement
There are many, many legacy Microsoft Access databases that need to be supported and enhanced. Often the original developer is long gone and there’s little to no documentation available. Yet, you’re expected to take care of it.
No matter what technology it is, taking over someone else’s work is always challenging. It’s even more challenging if you become responsible for a system that you (and no one else) understands.
FMS President Luke Chung explored this topic during his presentation at the Portland Oregon Microsoft Access User Group Conference. Learn about the issues and techniques we’ve learned over the years to triage, enhance, and support Microsoft Access applications, including migrating and upsizing to SQL Server and other platforms.
Microsoft Access Database Documentation and Analysis
300 Ways To Create Better Microsoft Access Applications
FMS is pleased to announce Total Access Analyzer 2010 is now shipping with support for both the 32 and 64 bit versions of Microsoft Access 2010. Total Access Analyzer is the world’s most popular Microsoft Access product winning every Best Access Add-in Award since 1994. This is the tenth major release of Total Access Analyzer since its debut in 1992.
Comprehensive Microsoft Access Database Documentation
Total Access Analyzer examines each Microsoft Access database to provide detailed documentation of individual objects and their relationships to each other. Comprehensive code analysis of VBA module code and macros is also performed. A powerful search features lets you find any string across all the properties, macros, and modules. Over 375 presentation quality reports are available with a wide variety of customization, sorting, and filtering options.
Avoid Crashes Before You Ship
The popularity of Total Access Analyzer is its ability to help Access users and developers improve their applications, avoid errors that can cause their solutions to crash, and learn best practices to increase their skills. By using Total Access Analyzer to take over an existing application, during development, and before deployment as part of one’s quality assurance process, developers can avoid embarrassing mistakes and improve consistency and performance.
Most importantly, Total Access Analyzer detects 300 ways to avoid errors, apply best practices, and improve performance. By leveraging our years of experience and customer feedback, FMS has created the most powerful system for diagnosing Microsoft Access applications. For instance, Total Access Analyzer can detect broken references to tables, fields, forms, reports, macros, and VBA code that will cause the database to crash as soon as they’re encountered. It finds unused objects (tables, queries, forms, and reports), macros, classes, procedures, variables, constants, etc. to help developers get rid of unnecessary and old work.
Advanced analysis is also performed to detect inconsistent field definitions across tables, duplicate SQL definitions, macro command problems, etc. Multi-level object and code relationships are presented with three advanced hierarchical diagrams showing application flow, data flow, and object containership.
Microsoft Access users, developers, and consultants of all levels rely on Total Access Analyzer to deliver great solutions. “Total Access Analyzer is an amazing product that I’ve relied on and recommended for years,” said Sal Ricciardi Programming Writer for Microsoft Corporation. “It’s a huge time saver.”
Total Access Analyzer 2010 adds many enhancements in addition to supporting both 32 and 64 bit versions of Microsoft Access 2010. Its VBA module code parser now supports the conditional compiler syntax (e.g. #If VBA7 Then) that’s common for supporting 32 and 64 bit environments. There’s advanced macro documentation and analysis that includes a “macro compiler” to validate if macro commands have the proper number of parameters. Improved views and reports simplify the review and printouts of macro lines scattered in embedded macros across the forms and reports. New temporary variable analysis documents and detects undefined and unused TempVars set by macros and modules. A variety of other new suggestions were added to detect timer event inconsistencies, query performance enhancement opportunities, and reserved word conflicts with the upcoming SQL Server 2012. With all the new features, Total Access Analyzer remains the most powerful diagnostic tool for Microsoft Access databases.
“Total Access Analyzer provides the comprehensive documentation and analysis that empowers Access users and developers to takeover existing Access applications and enhance them,” said Luke Chung, President and founder of FMS. “Total Access Analyzer offers a cost-effective way to understand what’s going on in a database, detect errors, improve quality, and learn Best Practices. It should be part of the quality assurance process during development and certainly before shipping. If it doesn’t pass Total Access Analyzer’s review, it’s not ready for deployment. It’s fundamental to our own Access development efforts.”
Availability and Pricing
Total Access Analyzer 2010 is available immediately from FMS for $299. Existing owners of Total Access Analyzer can upgrade for only $199. Total Access Analyzer is available via ESD and also comes with a professionally printed user manual and CD.
In Microsoft Access, a common need is to have multiple combo boxes or list boxes on a form, and to have the selection in one combo box limit the choices in a second combo box or listbox. For example, consider an Address form containing State and City lookups. When you select a state, you want the list of cities list to be limited the selected state.
This is known as cascading combo boxes or synchronized combo boxes.
We recently posted a tip and demo database containing a sample of species, both plants and animals, categorized by their taxonomic rank (kingdom, phylum, class, order, family, and genus). When you select the value “Animal” from the Kingdom combo box, the Phylum combo box is updated to only show Animal phylum. The Species list box is also filtered by your selection.