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 / General 1 / February 2006

Tip: Looking for answers? Try searching our database.

Run-time error '6' Overflow

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steve Fraser - 28 Feb 2006 16:10 GMT
I am wondering if anyone can help me out. I have an Access Database that
has been running since forever. Now when I try to open a form I get the
"Run-time error '6' Overflow message and a window asking me to debug or
end. Here is what i see on debug:

Private Sub CmdPeopleAdd_Click()
       Dim db As Database
       Dim Rs As Recordset
       Set db = CurrentDb
       Dim SQL As String
       Dim i As Integer
       Set db = CurrentDb
       SQL = "SELECT ID FROM Clients ORDER BY ID;"
       Set Rs = db.OpenRecordset(SQL)
       Rs.MoveLast
       i = Rs!ID + 1 ' Increment the number by one
       Rs.AddNew
       Rs!ID = i
       Rs.Update
       Rs.Close
       db.Close
   DoCmd.OpenForm "FrmPeople", , , , , , i
End Sub

The highlighted area to debug is i = Rs!ID + 1 ' Increment the number by
one.

Thank you,
sf
RoyVidar - 28 Feb 2006 16:12 GMT
Steve Fraser wrote in message <xB_Mf.23$R06.2282@news.uswest.net> :
> I am wondering if anyone can help me out. I have an Access Database that
> has been running since forever. Now when I try to open a form I get the
[quoted text clipped - 27 lines]
>
> *** Sent via Developersdex http://www.developersdex.com ***

It seems Integer isn't large enough any longer.

Dim i as long

Signature

Roy-Vidar

 
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.