T
toukey1
I have VB code on a form which updates a table based on certain
criteria. This form has been working properly for years however
recently I am unable to get pass the the line beginning with 'sno' as I
am getting an 'overflow' error. The criteria is a match and I have no
idea what is causing it. The first time it occurred I recreated the
table the code is updating and copied the records into it. It worked
fine for a week or so and then it occurred again needless to say I
tried recreating the table but still got the error.
add2 = " And [tblAllPols].[PolicyNo] = '" & vary & " ' "
add3 = " And [tblAllPols].[Premium] = " & varz
add4 = " And [tblAllPols].[ClientNo] = " & xx
vno = " And [tblAllPols].[InvNo] = 0"
sno = DLookup("[SeqNo]", "tblAllPols", "[tblAllPols].[Issuedate] = # "
& vard & " #" & vno & add2 & add3 & add4)
If sno = 0 Then
mes3 = MsgBox("Please check your information!", vbOKOnly)
Any help would be greatly appreciated.
criteria. This form has been working properly for years however
recently I am unable to get pass the the line beginning with 'sno' as I
am getting an 'overflow' error. The criteria is a match and I have no
idea what is causing it. The first time it occurred I recreated the
table the code is updating and copied the records into it. It worked
fine for a week or so and then it occurred again needless to say I
tried recreating the table but still got the error.
add2 = " And [tblAllPols].[PolicyNo] = '" & vary & " ' "
add3 = " And [tblAllPols].[Premium] = " & varz
add4 = " And [tblAllPols].[ClientNo] = " & xx
vno = " And [tblAllPols].[InvNo] = 0"
sno = DLookup("[SeqNo]", "tblAllPols", "[tblAllPols].[Issuedate] = # "
& vard & " #" & vno & add2 & add3 & add4)
If sno = 0 Then
mes3 = MsgBox("Please check your information!", vbOKOnly)
Any help would be greatly appreciated.