主题:求大虾帮助!怎么删除这个记录?重分感谢
Set rs1 = Nothing
rs1.Open "select * from chuku", cn, 3, 3
With Adodc1.Recordset
sl = Trim(.Fields("shuliang"))
zj = Trim(.Fields("zongjia"))
End With
rs1.AddNew
' rs1!sbbianhao = Trim(Text1(0).Text)
'rs1!sbname = Trim(Text1(1).Text)
rs1!bjname = Trim(text1(2).Text)
rs1!bjxinghao = Trim(text1(3).Text)
rs1!zongjia = Format(Val(text1(13).Text * text1(6).Text), "#0.00")
Adodc1.Recordset.Fields("shuliang") = sl - Trim(text1(13).Text)
Adodc1.Recordset.Fields("zongjia") = zj - Val(text1(13).Text * text1(6).Text)
rs1.Update '更新数据库
rs1.Close
通过这个式子Adodc1.Recordset.Fields("shuliang") = sl - Trim(text1(13).Text)
计算得到shuliang<=0的记录删掉怎么写啊!就是同时先计算如果等于零了就删掉这条记录,或者在下次打开这个窗体时删掉也可以在form load事件中实现也行!
rs1.Open "select * from chuku", cn, 3, 3
With Adodc1.Recordset
sl = Trim(.Fields("shuliang"))
zj = Trim(.Fields("zongjia"))
End With
rs1.AddNew
' rs1!sbbianhao = Trim(Text1(0).Text)
'rs1!sbname = Trim(Text1(1).Text)
rs1!bjname = Trim(text1(2).Text)
rs1!bjxinghao = Trim(text1(3).Text)
rs1!zongjia = Format(Val(text1(13).Text * text1(6).Text), "#0.00")
Adodc1.Recordset.Fields("shuliang") = sl - Trim(text1(13).Text)
Adodc1.Recordset.Fields("zongjia") = zj - Val(text1(13).Text * text1(6).Text)
rs1.Update '更新数据库
rs1.Close
通过这个式子Adodc1.Recordset.Fields("shuliang") = sl - Trim(text1(13).Text)
计算得到shuliang<=0的记录删掉怎么写啊!就是同时先计算如果等于零了就删掉这条记录,或者在下次打开这个窗体时删掉也可以在form load事件中实现也行!