hovercraft
Technical User
I'm out of ideas.
I'm counting groups of letters but when the number (my_ltrid) reaches 32767 I get an overflow error. The ltr_id field is a mediumint in a mysql table when shows up a text field if I view it in design view within Access. Which I (surprisingly) was able to change to a long numeric and save it (in Access). As you can see I have even tried changing the variable via clng() but still get the error.
Any thoughts?
Thanks a bunch!
Hovercraft
Code:
If my_defgroupcount = 1 And my_defcount = 1 Then
my_ltrid = CLng(my_ltrid + 1)
End If
If my_defgroupcount <> 1 Then
my_ltrid = CLng(my_ltrid + ((my_defgroupcount) - 1))
End If
If my_deftroupcount = 1 And my_defcount <> 1 Then
my_ltrid = CLng(my_ltrid)
End If
DoCmd.RunSQL "UPDATE tmp_tbl_ltrs SET tmp_tbl_ltrs.ltr_id = '" & my_ltrid & "' WHERE (((tmp_tbl_ltrs.scsid)='" & my_scsid & "'));"
rs.MoveNext
Loop
I'm counting groups of letters but when the number (my_ltrid) reaches 32767 I get an overflow error. The ltr_id field is a mediumint in a mysql table when shows up a text field if I view it in design view within Access. Which I (surprisingly) was able to change to a long numeric and save it (in Access). As you can see I have even tried changing the variable via clng() but still get the error.
Any thoughts?
Thanks a bunch!
Hovercraft