Thread: Overflow
View Single Post
  #3  
Old May 26th, 2010, 03:10 AM posted to microsoft.public.access.forms
mie via AccessMonster.com
external usenet poster
 
Posts: 9
Default Overflow

Use 'Long' not integer,

Dim intPhotoID As Long

anthony wrote:
Why does the last line in this code lead to the error message
"Overflow"? The figure in question is 33764 which is the value of
txtPhotoID before trying to assign it to intPhotoID. If I declare
intPhotoID as String, then all is well

Dim intPhotoID As String
Dim intProjectTeacherID As Integer
Dim strActivity As String
Dim strSequence As String
Dim strProfile As String
Dim DB As Database
Dim RST As Recordset
Set DB = CurrentDb

Set RST = DB.OpenRecordset("tblProjectTeacherPhotoLNK")
intPhotoID = Me.txtPhotoID


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/201005/1