VBA: Difference in two ways of declaring a new object? (Trying to understand why my solution works)

Fink’s answer gets your main problem right, which is that your first loop is adding multiple references to the same instance of ‘clsMatch’ to your collection. I’ll just elaborate on why your fix works. In VBA, a line like: Dim c As New Collection doesn’t actually create a new collection. The ‘Dim’ statement is always … Read more

Running Microsoft Access as a Scheduled Task

To the best of my knowledge the shortest path for a Windows Scheduled Task to “do something useful in Access VBA” is: Create a Public Function (not Sub) in the database. For example: Option Compare Database Option Explicit Public Function WriteToTable1() Dim cdb As DAO.Database Set cdb = CurrentDb cdb.Execute “INSERT INTO Table1 (textCol) VALUES … Read more

Hand Install of 64-bit MS Access ODBC drivers when 32-bit Office is present

using the /passive switch you can install 64-bit ace drivers even if 32-bit ms office is present: http://blog.codefluententities.com/2011/01/20/microsoft-access-database-engine-2010-redistributable/ Just be warned that installing the 2010 64-bit ACE engine on a machine with 2010 32-bit Office already installed CAN lead to some wacky behavior in your already existing Office 2010.

Difference between Microsoft.Jet.OleDb and Microsoft.Ace.OleDb

It’s mainly a matter of history, effectively ACE has superceded JET: Wikipedia answers your question in great detail. The most relevant sections are: With version 2007 onwards, Access includes an Office-specific version of Jet, initially called the Office Access Connectivity Engine (ACE), but which is now called the Access Database Engine. This engine is fully … Read more