Page 1 of 2 12 LastLast
Results 1 to 15 of 24
  1. #1
    stevebp is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2019
    Posts
    16

    Cascading Combo Box and Drop Down Pick List empty when tables are linked


    Hello

    To set the scene I am a complete Access novice and I have no understanding of writing code, only using the MS tools and wizards available.

    I have an issue where I am attempting to create a cascading combo box based on a 3 tables; Orders, Products and Product Category. When I choose a Product Category I want it to just show the products available to the category chosen. My problem is that when I enter the criteria in the Query Tools, it fails to show the Product Categories. I have spent hours trying to get this to work, without success. I am sure it is a simple thing I am getting wrong..

    The tables that have look up links to tblOrders and field ProductName and ProductCategory
    Click image for larger version. 

Name:	MS Access Tables.PNG 
Views:	29 
Size:	7.4 KB 
ID:	40274

    The form shows categories in both lists
    Click image for larger version. 

Name:	MS Access Form.PNG 
Views:	30 
Size:	4.2 KB 
ID:	40275

    When the criteria is entered to enforce the combo box restricted what categories are shown, the pick list is then blank

    Click image for larger version. 

Name:	MS Query.PNG 
Views:	28 
Size:	15.1 KB 
ID:	40276

    Empty pick list

    Click image for larger version. 

Name:	MS Access Form empty list.PNG 
Views:	28 
Size:	6.1 KB 
ID:	40277


    Thanks if anyone can point me ion the right direction.

    Regards

    Steve

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Maybe this will help:

    http://www.baldyweb.com/CascadingCombo.htm

    i would expect the category combo to reference the name combo or vice versa. You appear to have it referencing itself.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    stevebp is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2019
    Posts
    16

    Cascading Combo Box and Drop Down Pick List empty when tables are linked

    Thanks Paul

    I have also tried this before by changing to the ProductsName, but I get the same issue.

    I have seen on another thread on this forum that talks about not having picklists/lookups in tables, so I may try changing this to see if that has an effect.

    Regards

    Steve

    Attached Thumbnails Attached Thumbnails MS Query 2.PNG  

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I'd expect that criteria to be on the name field. That appears to be comparing apples to oranges. Can you attach the db here?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    stevebp is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2019
    Posts
    16

    Cascading Combo Box and Drop Down Pick List empty when tables are linked

    Hi Paul

    Thanks for this, unfortunately it is too big 1.7mb, there is a limit of 500kb.

    I have a copy on Onedrive that I could share with you if I had your email?

    Kind regards

    Steve
    PS
    Now inactive until tomorrow.

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    The limit should be 2MB if zipped.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    stevebp is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2019
    Posts
    16

    Cascading Combo Box and Drop Down Pick List empty when tables are linked

    Contacts.zip

    Thanks again Paul, filke zipped and attached, although it does not clear if it has worked?

    Regards

    Steve

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I think you had it backwards, see if this does what you want.
    Attached Files Attached Files
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #9
    stevebp is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2019
    Posts
    16
    Thank you so much Paul, that has sorted it and you also kindly populated the requery.

    Lots of respect for people like yourself who go to the trouble of sorting out problems like this in your own time.

    Thanks again.

    Kind regards

    Steve

  10. #10
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Happy to help Steve!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  11. #11
    stevebp is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2019
    Posts
    16
    Hi Paul

    Apologies for contacting you again, but whilst the individual form works when I embed in another one (Contact Details) as per the screen shot, it errors with a parameter value against the ProductsCategory. Spent a few hours trying to resolve, without any success! Are you able to take a quick look when you have time.
    Click image for larger version. 

Name:	MS Access Form - Contact Details.PNG 
Views:	20 
Size:	25.6 KB 
ID:	40291

    Contacts with forms.zip

    Thanks and regards

    Steve

  12. #12
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    The syntax changes when it's a subform:

    http://www.theaccessweb.com/forms/frm0031.htm

    but you'll find cascading combos don't work as well in a continuous form.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  13. #13
    stevebp is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2019
    Posts
    16
    Ok thanks Paul.

    Regards

    Steve

  14. #14
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,566
    Hi Steve

    I modified how ProductCategory is related to Products. - See the relationship diagriam.

    Your Contact Details form now works as it should
    Attached Files Attached Files

  15. #15
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Just make sure not to requery the form during data entry.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 17
    Last Post: 04-09-2018, 04:39 PM
  2. Replies: 6
    Last Post: 12-03-2017, 02:23 PM
  3. Replies: 8
    Last Post: 09-02-2016, 06:08 AM
  4. Replies: 5
    Last Post: 12-09-2014, 01:36 PM
  5. Replies: 2
    Last Post: 02-09-2012, 04:31 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