1)如用cmdClose按钮关闭当前窗体:
Private Sub cmdClose_Click()
DoCmd.Close
End Sub
2)如关闭其他打开的窗体:
Private Sub cmdClose_Click()
DoCmd.Close acForm, "窗体名", acSaveYes
'参数:acSaveYes=保存;acSaveNo=不保存;acSavePrompt=提示
End Sub
首页 >
1)如用cmdClose按钮关闭当前窗体:
Private Sub cmdClose_Click()
DoCmd.Close
End Sub
2)如关闭其他打开的窗体:
Private Sub cmdClose_Click()
DoCmd.Close acForm, "窗体名", acSaveYes
'参数:acSaveYes=保存;acSaveNo=不保存;acSavePrompt=提示
End Sub