Results 1 to 4 of 4
  1. #1
    HansJ is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    May 2016
    Posts
    9

    Dependent ComboBoxes

    I have found lots of material on dependent ComboBoxes and for a LARGE portion of what I am doing, well it works. However...
    Working with two different companies, sometimes they will have the same store number and that is where the issue occurs
    My first Combo cboGoToRetails Sql states


    Code:
    SELECT Stores.ChainID, Stores.ChainNameFROM Stores
    GROUP BY Stores.ChainID, Stores.ChainName
    ORDER BY Stores.ChainName;
    Me.cboGoToStore.Requery
    [/CODE]
    Then my second Combo cboGoToStore sql query states
    Code:
    SELECT Stores.StoreNum, Stores.ChainNameFROM Stores
    WHERE (((Stores.ChainName)=[Forms]![Hotline]![cboGoToRetail]))
    ORDER BY Stores.StoreNum;
    As long as the store numbers are not the same the Combo Boxes work as planned. But, let me select a store # that is in Company A as well as Company B, then cboGoToStore will land on the first record source.

    What am I missing/doing wrong here?

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    What exactly is a "store number"?
    What are you trying to do---in plain English?
    What is/are the rowsource(s) of your combobox(es)?

  3. #3
    NightWalker's Avatar
    NightWalker is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2016
    Location
    Midwest USA
    Posts
    253
    Orange,

    it looks like he has a list of stores like Home Depot or Wal-mart. Each store has a store number like Home Depot may have 500 stores and each has a number designating it in the home depot main database. The problem I think he is having is Home depot and Walmart may both have a store numbered #123 and he is using cascading CBOs picks Home Depot in first but is getting walmart info in second CBO. I think he is missing the relationship between the store number table and the store table.

    My take on it.

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    If that is the case, he must ensure his rowsource in combo 2 gets the store numbers for the company that is the company selected in combo 1.

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

Similar Threads

  1. Replies: 3
    Last Post: 03-31-2016, 12:16 PM
  2. Replies: 4
    Last Post: 09-25-2015, 11:12 AM
  3. Replies: 11
    Last Post: 06-19-2014, 09:22 PM
  4. Dependent comboboxes and date picker
    By edmscan in forum Forms
    Replies: 4
    Last Post: 03-24-2014, 08:14 AM
  5. Replies: 2
    Last Post: 05-16-2012, 03:10 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