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