Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

Sub Form Call

$
0
0
I have a form where I have a save button and it ensures that people have to fill out specific information in order to save and close the form. It works great, but I need to be able to do the same exact thing with the form referencing a sub form and I am not very good when it comes to that. The current form name is Action_Form_Liq and the subform is Action_Form_Liq_Sub.

Here is the code that I have used, I just need help updating it to reference all the same fields in the sub form.

If Me![Exceptions] <> "Submitted" And IsNull(Me![Exceptions]) Then
MsgBox "You must enter an action before you exit this record"

End If

If Me![Exceptions] <> "Submitted" And IsNull(Me![Exceptions_Description]) Then
MsgBox "You must enter an Exceptions Description before you exit this record"

End If

If Me![Exceptions] <> "Submitted" And IsNull(Me![Exceptions_Notes]) Then
MsgBox "You must enter a note before you exit this record"
DoCmd.GoToControl "Exceptions_Notes"
End If


If Me![Exceptions] = "Submitted" And IsNull(Me![Exceptions_Notes]) And IsNull(Me![Exceptions_Notes]) Or Me![Exceptions] <> "Submitted" And Not IsNull(Me![Exceptions_Notes]) And Not IsNull(Me![Exceptions_Notes]) Then
DoCmd.Save
DoCmd.Close
End If

Thanks for any help!

Viewing all articles
Browse latest Browse all 13329

Trending Articles