Results 1 to 4 of 4

Thread: Sub Form Call

  1. #1
    Join Date
    Jan 2013
    Posts
    4

    Unanswered: Sub Form Call

    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!

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14

  3. #3
    Join Date
    Jan 2013
    Posts
    4
    Thank you, this got me what I needed.

  4. #4
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    You're welcome!
    Have a nice day!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •