overflow error

M

Marty

Hi- I am running Word97. In a macro,I have an ADO
connection. In my table, I have a variable (filingdate)
as a type INT. In my macro, I have the statement: Public
pfilingdate as Integer. After getting the ADO recordset,
I step through the code, and I see that filingdate is
101382. (Which is indeed the correct value.) The
statement is: pfilingdate = rs("filingdate"). rs is the
recordset. When this line of code is executed, I get an
MSWord error: Overflow. Why?

Thanks for any help.

-Marty
 
J

Jezebel

Because the maximum value an integer can hold is 32767. Use a long. (Longs
are more handled more quickly anyway; integers are provided only for
backward compatability.) Better still, if it's a date, why not use a date
variable?
 

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

Similar Threads


Top