各位老师前辈,请教一个问题,我写了下面这段代码,保存在按钮里面执行,结果前面的判断是可以执行的,但是后面的保存功能无法执行,不知道问题点在哪里,忘各位老师前辈指点一下!
'判断是否被锁定
Dim r As Row = Tables(eform.name & "_Table1").Current
If r IsNot Nothing Then
'判断表是否被锁定
If r("锁定表")=True Then
If MessageBox.Show("该表已经被锁定, 无法进行操作, 请检查!","提 示",MessageBoxButtons.OKCancel,MessageBoxIcon.Information) = DialogResult.Cancel Then
Exit Function
End If
'判断行是否被锁定
If r("锁定行")=True Then
If MessageBox.Show("该记录已经被锁定, 无法进行操作, 请检查!","提 示",MessageBoxButtons.OKCancel,MessageBoxIcon.Information) = DialogResult.Cancel Then
Exit Function
End If
End If
End If
Else
'操作按钮功能
Tables(eform.name & "_Table1").Save
MessageBox.Show("恭喜,已成功保存修改!")
End If