Question : Microsoft Office Access Can't Find the Object

Hello:

I'm running a custom GL in Access 2007 (Compatibility Mode) with about 10 linked Excel 2003 queries output from Peoplesoft (on a server running Office 2003) with about 8 or 9 users accessing the database from Excel pivot tables.

The entire monthly update process is driven by VBA with a few Sql statements. I programatically link the output queries to the database to keep the dbase size under 2 gigs over a year since table growth is about 50k records/month

The update process was stable for a long time. The code would
(1) search for the most recent output queries,
(2) kill the existing files and copy the new files into a central Input Folder. Existing Access table-links to these files did not need to be recreated as long as the new files were in the same location with the same name.
(3) run my Delete/Append/MakeTable structured queries is Access

In order to save time, I thought it would be faster to not copy the new excel files to the input folder, but to just to
(1) delete the existing linked tables in Access and then
(2) re-link the new files at their existing locations without moving them

But I'm getting an error that "Microsoft Office Access Can't Find the Object", which is a correctly spelled and referenced excel spreadsheet.  My sole Access form is also frequently displaying #error in a text box where a value is supposed to be.

I suspect that frequently re-creating many linked tables is a problem for Access.

What would be the preferred method to manage this database while minimizing potential corruption? Would it be any of the following?
-updating links without opening the spreadsheets using ADO or Sql?
-going back to my original method of replacing linked files and not touching the existing links
-first importing the Excel files into a separate database and then linking the tables from Access to Access (is there an advantage to doing all of your processing in one application, i.e Access or Excel instead of both?)

thanks in advance

Answer : Microsoft Office Access Can't Find the Object

did you use the docmd.TransferSpreadsheet method to link or import the file?
If you use linked tables when working with Excel, Access may incorrectly identify the data type of the field because it looks at the first n number of rows (about the first couple of hundred rows). so it may incorrectly interpret a text field as a numeric.

For this reason I usually import excel files into a staging table in Access and then work proceed from there.
Random Solutions  
 
programming4us programming4us