Ashleyjp1985
Registered User.
- Local time
- Today, 19:31
- Joined
- Jul 6, 2011
- Messages
- 22
I have subform withina main form that displays records.
I have a save and close button on the subform that when cliked i want to close the mainform thereby saving the record. However i cannot get the main form to close.
this is my code, any help?
If Me.Dirty = False Then
MsgBox "No changes have been made.", vbOKOnly, "Required Data"
End If
If Me.Dirty = True Then
MsgBox "Changes have been made.Do you want to save these changes?", vbYesNo, ""
If vbYesNo = vbYes Then
DoCmd.Close acForm, "popformQcustomerbp"
Else
If vbYesNo = vbNo Then
DoCmd.RunCommand acCmdUndo
End If
End If
End If
End Sub
I have a save and close button on the subform that when cliked i want to close the mainform thereby saving the record. However i cannot get the main form to close.
this is my code, any help?
If Me.Dirty = False Then
MsgBox "No changes have been made.", vbOKOnly, "Required Data"
End If
If Me.Dirty = True Then
MsgBox "Changes have been made.Do you want to save these changes?", vbYesNo, ""
If vbYesNo = vbYes Then
DoCmd.Close acForm, "popformQcustomerbp"
Else
If vbYesNo = vbNo Then
DoCmd.RunCommand acCmdUndo
End If
End If
End If
End Sub