By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,474 Members | 3,244 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,474 IT Pros & Developers. It's quick & easy.

"Overflow"

P: n/a
Running a particular Access report or the query associated with it
brings up the warning "Overflow". What does this mean? WhatI have I
done wrong?

Both report and query were fine before lunch and the only thing I have
changed is updated the data from one of the tables it pull info from.

HELP!!!!!!!!!!!!!!!!!!!
PLEASE

Nov 13 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Overflow means the number is too large for the data type.

As an example, open the Immediate Window (Ctrl+G), and enter:
? 200 * 200
It overflows, because the default data type in VBA is Integer (16-bit),
which runs out at 32767. 40000 is too big, so we must convert one of the
numbers to a Long Integer (32-bit) so it does not overflow:
? CLng(200) * 200

Use CDbl() to convert to a double, CCur() to convert to Currency, CVDate()
to convert to date.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Spook" <st**************@sainsburys.co.uk> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
Running a particular Access report or the query associated with it
brings up the warning "Overflow". What does this mean? WhatI have I
done wrong?

Both report and query were fine before lunch and the only thing I have
changed is updated the data from one of the tables it pull info from.

HELP!!!!!!!!!!!!!!!!!!!
PLEASE

Nov 13 '05 #2

P: n/a
Overflow means the number is too large for the data type.

As an example, open the Immediate Window (Ctrl+G), and enter:
? 200 * 200
It overflows, because the default data type in VBA is Integer (16-bit),
which runs out at 32767. 40000 is too big, so we must convert one of the
numbers to a Long Integer (32-bit) so it does not overflow:
? CLng(200) * 200

Use CDbl() to convert to a double, CCur() to convert to Currency, CVDate()
to convert to date.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Spook" <st**************@sainsburys.co.uk> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
Running a particular Access report or the query associated with it
brings up the warning "Overflow". What does this mean? WhatI have I
done wrong?

Both report and query were fine before lunch and the only thing I have
changed is updated the data from one of the tables it pull info from.

HELP!!!!!!!!!!!!!!!!!!!
PLEASE

Nov 13 '05 #3

P: n/a
Cheers for that.

Stephen

Nov 13 '05 #4

P: n/a
Cheers for that.

Stephen

Nov 13 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.