Results 1 to 2 of 2
  1. #1
    Delta729 is offline Advanced Beginner
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Nov 2010
    Location
    Los Angeles
    Posts
    95

    Help referencing a subform

    I'm trying to check for null values on the main form and subform, but the subform null is not working. The subform control I want to ensure is not empty is txtDocInfo. "Me.tblTaskQuickSubform.Form.txtDocInfo".
    I know that there should be an "!" vs the ".", but I'm sure there is something else wrong here. Can someone tell me know I'm doing wrong here.

    Private Sub cmdSaveAndClose_Click()

    If Len(Me.cboQuickTitle & vbNullString) = 0 Or _
    Len(Me.cboOriginator & vbNullString) = 0 Or _
    Len(Me.cboClientNumber & vbNullString) = 0 Or _


    Len(Me.cboMatterNumber & vbNullString) = 0 Or _
    Len(Me.tblTaskQuickSubform.Form.txtDocInfo) Then
    MsgBox "Fill in everything."
    Else
    DoCmd.Close , ""
    End If

    End Sub

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Already marked solved - is it?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. referencing a subform from main form
    By slimjen in forum Forms
    Replies: 6
    Last Post: 06-25-2015, 12:38 AM
  2. Replies: 6
    Last Post: 02-23-2014, 05:53 PM
  3. Replies: 2
    Last Post: 01-18-2014, 11:51 AM
  4. Referencing subform controls
    By cheyanne in forum Forms
    Replies: 7
    Last Post: 04-30-2012, 10:00 AM
  5. Referencing a form in a subform
    By 161 in forum Forms
    Replies: 3
    Last Post: 01-24-2011, 03:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums