Results 1 to 2 of 2
  1. #1
    msmithtlh is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    151

    Filter available values in a combo box, based on another combo box

    I have a subform. On this subform, I am trying to use 2 related combo boxes. The first combo box selects a category. In the second combo box, I want to select items that are a subset of the category.



    category = BP field, subcategory = BP error

    The table for the category has only the category names (primary key). The table for the secondary items has the category name and the sub-category name. The primary key is the two fields, concatenated.

    Relationship is one (category) to many (subcategories).

    On the subform, I can select the category. When I go to select the sub-category, I get a prompt to "enter parameter value." The value it is showing is the form name of the category field. If I manually type in the value, everything works fine. I can't figure out what is missing for it to recognize the value in that field.

    Even though I'm just creating the database, it is too large to attach. I am attaching a screen shot.screen shot.doc

    Thanks in advance.

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    So it is not recognizing

    Forms!BP Error List!BP Field

    The subform seems to be looking for a control name based on VBA. Change that VBA to

    Forms![BP Error List]![BP Field]

    The spaces in your form and control names can cause issues that often times are resolved by enclosing the names in brackets.

    Double check that the control name exists and that it is bound to something via the controlsource issued to the subform by the combobox.

    I posted a sample db that has examples of using recordsources via SQL in VBA. The VBA is copy and paste friendly. All of the table/query and field names are displayed and enclosed in brackets.

    https://www.accessforums.net/sample-...tml#post191005


    .

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

Similar Threads

  1. Combo Box filter not showing values
    By Chatholo in forum Forms
    Replies: 7
    Last Post: 08-01-2013, 08:53 AM
  2. Replies: 3
    Last Post: 07-03-2013, 10:38 AM
  3. Replies: 15
    Last Post: 03-17-2013, 07:40 PM
  4. Replies: 1
    Last Post: 03-27-2010, 06:13 AM
  5. Replies: 1
    Last Post: 08-26-2009, 10:45 AM

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