|
我想数据保存后不能修改,代码如下:
Private Sub 命令57_Click() '保存命令
On Error GoTo Err_命令57_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Call DisableEdit '保存后转为不可以修改或删除
Exit_命令57_Click:
Exit Sub
Err_命令57_Click:
MsgBox err.Description
Resume Exit_命令57_Click
End Sub
______________________________________________________
Sub DisableEdit() '按钮所在的窗体不可以修改或删除
On Error GoTo Err_DisableEdit
Me.AllowEdits = False
Me.AllowDeletions = False
Exit_DisableEdit:
Exit Sub
Err_DisableEdit:
'MsgBox Err.Description
Resume Next
End Sub
但运行后,系统提示:命令或操作"SaveRecord"当前不可用.
请问错误在哪? 能不能帮忙改一下,谢谢啦!!!
|
|