Linked spreadsheet error #Num! in Access 2000 VB

M

ML

Hi

I'm new to both Access and VB, and have created a VB module run fro
Access 2000 to run a report that links in a spreadsheet with mixed
data (numeric and alpha)
that I'm looping through and comparing to an access table for the
report. I have tested with this scenario successfully using a test
file with mixed data, but when run with client's data. the rows with
pure numeric
data in the subject column is seen as "#Num!" when viewing as the
linked table.

The numeric data is is causing a "Run-time error "3349": Numeric field
overflow" when the module is run, but the alpha data is processed
without error until this numeric data is read. The difference between
the test and actual client data is that the numeric data in the test
spreadsheet is being forced to text, and the actual client data is not.

In order to force the input data to text I modified the recordset def
as:
CurrentDb.OpenRecordset("select CStr([P/N]), Description, RefPrice,
QTY, Condition from sheet1", dbOpenDynaset). Note: The first column's
name is "P/N".

I then get a "Run-time error '3265': Item not found in the collection"
the reading the recordset.

Can anyone inform me how to modify the recordset definition to
successfully force this subject column to text?

Thanks in advnace.

ML
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top