Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2004
    Atlanta, GA

    Unanswered: Query for a combo box on a sub form??

    Hello all,
    I have a sub form (m_p_sub) in access that has a combo (combo_1) that gives different info depending on what selection you choose in the first combo (visit_class)
    When i was making the form i used a query in the row source of combo_1 such as:

    SELECT *
    FROM m_p_vtype
    WHERE vtype = Forms!m_p_sub!visit_class;

    When i dropped it in to the other form (chart_review) which is in a tab of ANOTHER form (chart_review_main) obviously, it doesn't work.
    I'm pretty new to sql/vb/access but i tried a couple of things like:
    Forms!chart_review_main!chart_review!m_p_sub!visit _class
    but no joy....
    Can anyone help (i'm sure i deserve a good eye rolling for this but, hey i'm learning )
    Thanks in advance

  2. #2
    Join Date
    Feb 2004
    Chicago, IL
    I am a little confused by your post, but in general to refer to a combo box in a subform:


    Use Me if the code is in the form module. If you are in a different form then use the Forms collection.

  3. #3
    Join Date
    Dec 2004
    Madison, WI

    Subform expression

    You can also try:

    Forms!chart_review_main!chart_review!m_p_sub.Form! visit _class

Posting Permissions

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