John Vinson said:
Access must guess at the correct datatype for
fields, based on the first few rows of the spreadsheet; it can guess
wrong, for instance using an Integer field because the first few
numbers are small. If there's a much larger number down the sheet (or
if the "numbers" are actually text fields such as PartNumbers) you'll
get this error.
John,
Yes, I've read that article too:
"Numeric Field Overflow" error message occurs when you query a table
that is linked to Excel spreadsheet
http://support.microsoft.com/default.aspx?scid=kb;en-us;815277
It appears that when querying an Excel table via a linked table, MS
Access tries to determine the data type itself and can arrive at the
answer of Integer, even though Excel's only numeric data type when in
'database' mode is Double (FLOAT). In going out on a limb in this way,
MS Access seems to trip itself up when it encounter a Double value
than cannot be cast as an integer. Not very clever.
On the other hand, when querying an Excel table *directly* (i.e. no
linked table), MS Access simple accepts the data type as determined by
Excel itself. Actually, Jet determines the Excel data type but it is
Jet on the *Excel* side ('Excel Jet') rather than Jet on the MS Access
side. For details on how 'Excel Jet' determines data type, see:
http://www.dicks-blog.com/archives/2004/06/03/external-data-mixed-data-types/
So it raises the question, Why doesn't MS Access just go with the
'Excel Jet' data type when querying a linked table, rather than trying
to do it itself if it sometime leads to failure? Using the 'Excel Jet'
data type would mean it would work every time.
Jamie
--