Results 1 to 2 of 2
  1. #1
    siema24 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jan 2017
    Posts
    22

    Dynamically updating a combo box fails

    Hi,
    I have problem with dynamically updating a combobox values based on another combobox choice within one form named frmOne.
    It works fine unless frmOne is used as a subform. When opening "parent" form access asks me to type value that will become a criteria for combobox "row source".
    Do you guys know if it's a common problem? How to solve it? If you need then I can provide you with more details. Thanks!

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    If the combo box is in a sub form, then the query source of the combo must use the full path to the form.
    same with a parent form. you can't have it both ways.

    either make 2 forms, frmParent,and frmSubForm, each with a separate combo query
    select field from table where [field2]=forms!FrmParent!cboBox
    and
    select field from table where [field2]=forms!FrmParent!subForm!cboBox

    or
    dynamically swap the query in frmOne depending where it is,
    Me.subform!form!cboBox.rowsource="qsSubQuery"

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

Similar Threads

  1. Dynamically updating a subform's content
    By DubCap01 in forum Forms
    Replies: 2
    Last Post: 02-20-2017, 12:54 PM
  2. Replies: 0
    Last Post: 02-25-2015, 08:09 AM
  3. Replies: 28
    Last Post: 01-28-2015, 02:24 PM
  4. Replies: 2
    Last Post: 12-26-2013, 02:50 PM
  5. Replies: 5
    Last Post: 06-28-2011, 06:40 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