![]() Does the app still work if you close it then re-open it? If so it may be storing the data into a global variable, which doesn't get cleared till the app is closed. Having said all this, this wouldn't explain why the app would run the first time after installation, but fail the second. It does not matter what value just that there is one there. Access allow a number of this kind to be at maximum 2147483647. I find the sort of expression you have used very hard to follow. if the divisor is nearly zero, then you may get an overflow result. Although it can be an integer problem, it is most likely to be caused by a divide by zero, but not necessarily. To fix that, you first mask off the leftmost bit, THEN multiply by 2. We need to use the function CLNG in VBA CLNG In VBA VBA CLng or 'VBA Convert to Long' is an in-built Excel function that facilitates converting the numerical values or data exceeding the long data type limit into the acceptable data type. overflow is a number too big to fit the size of the variable. Run app and it works because it assigns the number to a variable which has been declared as an integer. What I was trying to do with that is get a line count and a of those lines that have a value in the qtyrec field. Here is how you left shift a Byte without overflowing: Dim abyte as Byte abyte &H81 10000001 To shift left, you multiply by 2, BUT because the msb is 1, multiplying by 2 gives you an Overflow. If you arent doing mathematical operations on them, you might want to use a string on them. ![]() To store numbers as large as 64 bits you will need to use the DOUBLE or DECIMAL type, or you could use a string. Say for example (just working with integers again), you've been passing order numbers to the app via your file, the app could be then taking that order number and assigning it to a variable which now can no longer cope with the data because you've reached the limit (badly explained so here's an example) 1 I continuously get an overflow message in access when i am trying to download a report in my database. Anything above/below that will cause an overflow. It could also be down to the actual data you're passing to it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |