📄
字号:
'RDS1.CancelUpdate
MsgBox "无法更新数据!"
End If
if moveflag then
grid1.row = grid1.row +1
else
grid1.row = grid1.row -1
end if
End Sub
Sub CancelUpdate()
On Error Resume Next
RDS1.CancelUpdate
If Err.Number <> 0 Then
'RDS1.CancelUpdate
MsgBox "无法恢复原来数据!"
End If
Grid1.Rebind
End Sub
sub addrecord()
'grid1.setfocus
grid1.EditActive = true
rds1.recordset.addnew
grid1.col = 0
End sub
sub delrecord()
ifdel = msgbox("是否删除此成绩类型的所有信息?",4,"请特别注意!")
if ifdel = vbNo then
exit sub
end if
IF NOT rds1.recordset.EOF and NOT rds1.recordset.BOF then
rds1.recordset.delete
grid1.Rebind
else
msgbox "已经到数据库的末尾或开始!不能删除!"
end if
end sub
SUB GRID1_BeforeColUpdate(colindex,oldvalue,cancle)
new_value = grid1.columns.item(colindex)
select case colindex
case 0
if len(trim(new_value)) =0 then
msgbox "成绩类型号不能为空!请重新输入"
cancle = true
exit sub
end if
rds2.sql = "select 成绩类型代码 from scoretype where rtrim(成绩类型代码) ='" & trim(new_value) & "'"
rds2.ExecuteOptions = 1
rds2.refresh
if rds2.recordset.recordCount>0 then
msgbox "成绩类型代码重复!请重新输入"
cancle = true
end if
case 1
if len(trim(new_value)) =0 then
msgbox "成绩类型名称不能为空!请重新输入"
cancle = true
end if
end select
END sub
</script>
</div>
<p>
<!--msnavigation--></td></tr><!--msnavigation--></table><!--msnavigation--><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td>
<p align="center"> </p>
</td></tr><!--msnavigation--></table></body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -