Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    jodilees is offline Novice
    Windows 11 Access 2021
    Join Date
    Sep 2022
    Posts
    7

    Cascading combo box is not working

    Hi All

    I am tearing my hear out with this. I know it is probably a simple setting somewhere.

    I am going to upload a copy of the database. On my OrdersF I want the following to occur
    Customer.zip
    Field
    Pivot - generated from a list of pivots shown on OrdersT
    Variety - only shows the variety grown on that pivot


    Generation - only shows the generation linked to that variety on that pivot (this sometimes might be multiple values.

    I have managed to get pivot and variety fields working fine, but I can not get the Generation to work. I am sure I have probably put a setting wrong somewhere in my playing but I can't work it out.

    Please please can someone help me.

    Access novice here!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Shouldn't the Generation filter criteria reference Variety?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    jodilees is offline Novice
    Windows 11 Access 2021
    Join Date
    Sep 2022
    Posts
    7
    Are you talking in the form query part?
    I have added and taken bits out some many times trying to get it to work.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Talking about the Generation combobox RowSource SQL.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    jodilees is offline Novice
    Windows 11 Access 2021
    Join Date
    Sep 2022
    Posts
    7
    Yes I deleted it back out before i zipped the file.
    I have been getting all sorts of results in that field except the one I want.
    I have played with the settings on the table and also on the form. I just can’t get it to work (:
    Last edited by jodilees; 09-15-2022 at 03:20 AM. Reason: Typo

  6. #6
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,563
    Hi

    Your table CropT structure is wrong.

    You should initially have a form to manage the Varieties associated with a Pivot as well as the Generations associated to a Specific Variety.
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  7. #7
    jodilees is offline Novice
    Windows 11 Access 2021
    Join Date
    Sep 2022
    Posts
    7
    Thanks, I imported them from the excel spreadsheets we are currently running from.
    How does a novice like me fix it?

  8. #8
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,563
    Hi Can you upload a list of the Generations?
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  9. #9
    xps35's Avatar
    xps35 is online now Competent Performer
    Windows 10 Office 365
    Join Date
    Jun 2022
    Location
    Schiedam, NL
    Posts
    229
    There is more wrong in your model. You must relate tables by key. And in related tables you must only include the key of the main table. So this is wrong:
    Click image for larger version. 

Name:	pivot.jpg 
Views:	32 
Size:	10.5 KB 
ID:	48722

    First rebuild this to:
    Click image for larger version. 

Name:	pivot2.jpg 
Views:	32 
Size:	10.9 KB 
ID:	48723

    But that is not all. If I look at the distinct values of the (improved) CropT table (excluding ID and Generation) I see:
    Click image for larger version. 

Name:	pivot3.jpg 
Views:	33 
Size:	52.1 KB 
ID:	48724
    It looks like this table is not properly normalized. For each PivotID in this table, I see the same Paddock Name and DISTRICT. It seems to me those fields shout be part of PivotT.

    Get all these things right before you continue. It is essential to have a proper structure first.

  10. #10
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Rename the comboboxes different from the field names, like: cbxPivot, cbxVariety, cbxGeneration

    Generation combobox properties:

    RowSource: SELECT DISTINCT Generation FROM CropT WHERE Variety=[cbxVariety];
    BoundColumn: 1
    ColumnCount: 1
    ColumnWidths: 1"

    RowSource for other two comboboxes:

    SELECT DISTINCT Pivot FROM CropT;

    SELECT DISTINCT Variety FROM CropT WHERE Pivot=[cbxPivot];


    Advise not to build lookups in table, just comboboxes or listboxes on form, unless you really must have multi-value field which I also advise against.

    Really want Generation field set for multi-value?


    Agree with xps35: should be saving CustomerID into OrdersT, not CustomerName and same could be said for PivotID. Should not be PivotID and Pivot fields in CropT.

    I expect you used wizard to create the lookups in table and now removing them to fix the key links will be a challenge. Might be easiest to rebuild tables from scratch.


    Advise not to use spaces in naming convention. And avoid same exact field name in multiple tables.

    Pivot is a reserved and should avoid reserved words as names. Review http://allenbrowne.com/AppIssueBadWord.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  11. #11
    jodilees is offline Novice
    Windows 11 Access 2021
    Join Date
    Sep 2022
    Posts
    7
    Hi All

    Thank you so much for the hints and tips. I started again and rebuilt what I was aiming for without any problems. I think I had fiddled with too many settings trying to get it working previously.

    With a clean slate it was easy to set up.

    In hindsight I should have asked for some help earlier rather than creating a tangled web.

    Kind Regards

    Jodi

  12. #12
    jodilees is offline Novice
    Windows 11 Access 2021
    Join Date
    Sep 2022
    Posts
    7
    Hi All

    Im still a novice, but have managed to find my way through for what I needed to do. However I am having an issue with one part.

    I set up my forms for entry with cascading combo's and it all worked great.

    But when I went back to my tables, I was not getting the result there. I updated the tables to be the same settings as in the forms, however the cascading combo is just not working how it should be.

    Can you not have cascading combos in a table?

    Thanks in advance to any and all that respond to my query.

    Cheers

    Jodi

  13. #13
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,563
    Hi Jodi

    What values are being stored in your tables in regard to the Cascading Combobox's?
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  14. #14
    jodilees is offline Novice
    Windows 11 Access 2021
    Join Date
    Sep 2022
    Posts
    7
    Hi Mike
    They are l each doing a lookup back to the crop list.
    Each pivot has multiple varieties and multiple generations.
    My cascade in my form is
    variety where pivot in form = pivot on crop
    Generation where variety in form = variety in crop and pivot in form = pivot on crop
    I attempted to replicate this logic in the table and when I did it seemed to confuse the form cascading combos.
    I’m trying to achieve a data sheet type view of orders.
    I hope this isn’t too confusing
    Cheers
    Jodi

  15. #15
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,563
    Hi Jodi

    Easiest way we can resolve this is for you to upload a copy of the database
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Cascading ComboBox Not Working - *driving me crazy*
    By cathalfarrell in forum Forms
    Replies: 3
    Last Post: 03-07-2019, 07:55 PM
  2. Replies: 7
    Last Post: 05-23-2014, 08:39 AM
  3. Replies: 1
    Last Post: 02-27-2014, 03:43 PM
  4. cascading combo boxes, .requery not working
    By jsmath22 in forum Forms
    Replies: 8
    Last Post: 10-12-2012, 12:28 PM
  5. cascading combo boxes stop working in DAP system
    By James Brazill in forum Forms
    Replies: 5
    Last Post: 06-28-2011, 03:51 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