运行时错误 6 溢出
runtime error 6 overflow
在到达以 'minimo' 开头的行时,我在以下代码中收到运行时错误 6 'overflow' 消息。直到最近它工作正常。在为其基础形式提供一些修饰类型的更新后,出现了此消息,我不明白为什么。
'Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
rs.Open "select min(autonumerazione) from tblDashboard01", CurrentProject.Connection
Do While Not rs.EOF
minimo = rs.Fields(0)
rs.MoveNext
Loop
minimo = minimo - 1
st_Sql = "update tbldashboard01 set MasterLevel = autonumerazione - " & minimo & ""
Application.DoCmd.RunSQL (st_Sql)
尝试在程序开头插入以下行:
Dim minimo as Long
在到达以 'minimo' 开头的行时,我在以下代码中收到运行时错误 6 'overflow' 消息。直到最近它工作正常。在为其基础形式提供一些修饰类型的更新后,出现了此消息,我不明白为什么。
'Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
rs.Open "select min(autonumerazione) from tblDashboard01", CurrentProject.Connection
Do While Not rs.EOF
minimo = rs.Fields(0)
rs.MoveNext
Loop
minimo = minimo - 1
st_Sql = "update tbldashboard01 set MasterLevel = autonumerazione - " & minimo & ""
Application.DoCmd.RunSQL (st_Sql)
尝试在程序开头插入以下行:
Dim minimo as Long