Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2003
    Location
    Columbia, MO
    Posts
    57

    Unanswered: Combo box that limits criteria based on previous criteria in a sub form

    I was wondering if any of you fine folks could explain this problem to me. I have a form with 2 combo boxes. The first contains Events and is loaded from a table. The second is loaded from a query and is loaded with just the Happenings that meet that Event. The query contains 2 tables-Events and Happenings. The query criteria for the Event is [Forms]![frmsbEventLog]![Event] and it just shows the Happenings that meet that Event.

    It works great when the form is opened by itself. When I make that a subform in a larger form though, I can choose the Event. However, when I get to the Happening, I get a dialog box that pops up asking for the Event value in the subform that I just picked, or [Forms]![frmsbEventLog]![Event]. It won't load it like it would when it was a straight form.

    Anybody know what I am doing wrong? Any help on this matter would be greatly appreciated.

    Thanks.

    David
    Last edited by decad1; 04-11-03 at 11:01.

  2. #2
    Join Date
    Aug 2002
    Posts
    45
    hi
    change
    [Forms]![frmsbEventLog]![Event]
    to
    [frmsbEventLog].[Form]![Event]
    i think thats the right syntax

    you need to access the subform on the main form. if you try to reference the form when it is a subform access thinks its closed and asks you for the value.
    #cq
    Sent By Royal Mail

  3. #3
    Join Date
    Jan 2003
    Location
    Columbia, MO
    Posts
    57
    Thanks for the reply. That still doesn't do it. I still get a dialog box popping up.

  4. #4
    Join Date
    Aug 2002
    Posts
    45
    Originally posted by decad1
    Thanks for the reply. That still doesn't do it. I still get a dialog box popping up.
    try this one

    Forms![YOURMAINFORM]![frmsbEventLog].[Form]![Event]

    if that doesnt work dont know or understand!!!
    cq
    Sent By Royal Mail

  5. #5
    Join Date
    Jan 2003
    Location
    Columbia, MO
    Posts
    57
    Now that works like a dream.

    Thanks so much. I appreciate it. I had been struggling with that for several days.

    Again thanks.

    David

Posting Permissions

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