Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / September 2005

Tip: Looking for answers? Try searching our database.

Fixing Numeric Overflow

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Carmen - 30 Sep 2005 04:51 GMT
I've built an append query to add linked data to a table in Access. The link
data has a numeric field and had been predetermined by Access 2003 to be
integer.  I'm encountering numeric overflow when I try to append the data.  
It's very likely that I have numbers over the integer limit.  Is there a way
to convert the data to long?

To temporary overcome the problem, everytime before I press the append
button, I have to make some changes to the data (ie in Append Query, in the
numeric field, add +1-1 and then look at the data).

Thanks,
Carmen
John W. Vinson/MVP - 30 Sep 2005 05:51 GMT
> I've built an append query to add linked data to a table in Access. The
> link
[quoted text clipped - 3 lines]
> way
> to convert the data to long?

Sure. Rather than appending the linked field value directly, wrap it in a
CLng() expression:

AppNum: CLng([fieldname])

Note that this will fail too if the field is greater than two billion odd
(the limit for long integers); are you *really* doing calculations with
numbers of this size? If the "numbers" are actually identifiers, could you
change the datatype of the field to Text?

John W. Vinson/MVP
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.