Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2006
    Posts
    2

    Unanswered: reference subform on tab control

    How do I reference a subform on a tab control. I'm trying to reference a field on the subform in a macro because I'm not to familiar with VBA. This is what I have so far under the condition column:

    [Forms]![frmEmploymentVerification]![sfmEmploymentVerification6M.Form]![OpenedDateFilter]="All"

    Main Form: frmEmploymentVerification
    Tab Control Name: TabEmployment
    Sub Form: sfmEmploymentVerification6M
    Field on Sub Form: OpenedDateFilter

    I get the message stating that MS Access can't find the field sfmEmploymentVerification6M.Form referred to in your expression.

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Controls can't have "." in their name. Are you sure you don't mean:

    [Forms]![frmEmploymentVerification]![sfmEmploymentVerification6M].Form![OpenedDateFilter]="All"
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Aug 2006
    Posts
    2
    Ya, you're right that's what it should be. I had been looking into other forums for suggestions and I guess I misunderstood the thread. I changed it to what you had and I now get the following error:

    The action or method is invalid because the form or report isn't bound to a table or query.

    My subform is bound to a query so I'm not sure what that means.
    Thanks

Posting Permissions

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