Results 1 to 8 of 8
  1. #1
    thewabit is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jan 2010
    Posts
    36

    combo boxes

    I have 2 combo boxes, "CmtAreaCode" and ""obComment". I would like to have


    ObComment to be populated with specific items depending on what is selected
    in CmtAreaCode. Both use a query in the rowsource to get the data but I cant get
    the ObComment box to change when an item is selected in CmtAreaCode.

    There are two tables involved. One has the comment area code 1,2,3..etc.and comment area name associated with that code.

    The other table has the specific comments and what area code that comment falls under. (ie there are 4 comments that relate to comment area code 1)

    Here are the 2 querys in the rowsource for "CmntAreaCode" and "obcomment"
    respectively:

    SELECT tblCmntAreas.CmntAreaCode AS Code, tblCmntAreas.CmntAreaName AS [Comnt
    Area] FROM tblCmntAreas;

    SELECT Comments, CmntAreaCode, CommentID FROM tblComments WHERE
    CmntAreaCode=3 ORDER BY tblComments.CmntAreaCode;


    Obviously I am a newbie and I cant get this to work!

    Thanks for your time!

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows XP Access 2002
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You are describing Cascading ComboBoxes.

  3. #3
    MAF4Fam6's Avatar
    MAF4Fam6 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Dec 2009
    Location
    Fruit Heights, Utah USA
    Posts
    140

    combo boxes

    A suggestion would be to build a simple query as the Row Source for the 2nd Combo Box filtered by what the user selects via the first Combo Box.
    Query (Row Source) for 2nd Combo Box:
    Criteria under CmtAreaCode field:
    Like [Forms]![NameOfForm]![Combo13]
    Combo13, in this example, is the name of the control for the 2nd Combo Box which is found in the Other Tab of the Property Sheet.
    Row Source for 2nd Combo Box:
    Example:
    Code:
    SELECT [NameOfYourQuery].[CommentsFieldName] FROM NameOfYourQuery ORDER BY [CommentsFieldName];
    -RC

  4. #4
    thewabit is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jan 2010
    Posts
    36
    MAF4,

    I want to take this slow as I am VERY new.

    I don't find a control under the OTHER tab in the properties for combo 2. There is a "Control Source under ALL.

    Are you a Fantom pilot by chance?

  5. #5
    thewabit is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jan 2010
    Posts
    36
    RG,

    Before I try the cascading boxes, it appears that your CB are unbound....mine are not. Does that make a difference?

  6. #6
    MAF4Fam6's Avatar
    MAF4Fam6 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Dec 2009
    Location
    Fruit Heights, Utah USA
    Posts
    140

    Post

    I don't find a control under the OTHER tab in the properties for combo 2. There is a "Control Source under ALL.
    I did not notice you are running Access 03. I will install Access 03 on another PC and come back.

    -RC
    By the way...not a Fantom pilot.

  7. #7
    thewabit is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jan 2010
    Posts
    36
    Thank You!

  8. #8
    MAF4Fam6's Avatar
    MAF4Fam6 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Dec 2009
    Location
    Fruit Heights, Utah USA
    Posts
    140

    Post

    In your form's design view in Access03:
    The name of the control for the 2nd Combo Box automatically displays whenever you double-click the combo box. It should display like so...Combo Box: Combo0. In this case, Combo0 is the name of the control for the Combo Box. You should also see five tabs: Format, Data, Event, Other, All. In the Other Tab, it is located in Name...............

    -RC

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

Similar Threads

  1. 2 combo boxes - Conflict
    By JimS in forum Forms
    Replies: 3
    Last Post: 10-13-2009, 03:49 PM
  2. combo boxes
    By googenfrog in forum Forms
    Replies: 3
    Last Post: 07-03-2009, 05:41 PM
  3. Help with Subforms/Combo Boxes
    By mikel in forum Forms
    Replies: 11
    Last Post: 06-03-2009, 07:45 AM
  4. combo boxes
    By labrams in forum Forms
    Replies: 0
    Last Post: 04-20-2006, 09:28 AM
  5. Combo Boxes
    By Mxcsquared in forum Forms
    Replies: 0
    Last Post: 01-19-2006, 04:59 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