Suing Excel 2007 to automate Access 2007, a query returns incorrect results with the code below. I have VBA code to import a text file, manipulate data and distribute it to various sheets in a workbook. The code with Dims, error traping and commects removed in the main function is:
The called function is:
If I create the database and application objects in the function that calls them, I get correct results. The query is a simple select on a table. Before the text import, I get 5 records, after the import is done, I get 3 recs. If we close Excel and run the query in Access, I get 5 recs. Got the latest updates for os (Win 7) and apps (Service Pack 2). Anyone seen anything like this? And what is the "best practice" for coding this?
Bookmarks