Results 1 to 12 of 12
  1. #1
    abader is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2020
    Posts
    4

    Question Help with changing the content of a list box based off a selection from a combo box

    Good day everyone. I am looking for assistance in making a list box dependent on a combo boxes selection. Long story short, I have been forced, employer and client know I'm in over my head and both told me to "figure it out", to create a data base that tracks kits of equipment. Each kit has items that are expendable and items that require calibration. I have 3 tables, a kit table, subcomponent calibration table, and an expendable table. I am to create a "Request form" that allows them to select what kit they want, display the contents of that kit, and an additional List box that displays additional equipment available for selection to add to the request. I am struggling with linking the list box to the combo boxes selection. I thought that using the same set up as cascading combo boxes would work, but I haven't had any success. Any suggestions?

  2. #2
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,115
    What do you mean not having any success? Errors, not the expected results, etc.? Not much to go by but for the listbox row source property use a query that uses the combo's value in the criteria. Then requery the listbox in the after update event of the combo. How are the "additional" items from the list box linked to the selection in the combo?

    Maybe you can explain a bit better and/or post a sample of your database (compact it then zip it) so we could have a look.

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  3. #3
    abader is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2020
    Posts
    4
    Vlad,
    The attachments on here wouldn't load the file, so here is the link to my Google Drive it is on. It wont display anything. I'm sure it is something dumb that I did, I just don't see it.

    https://drive.google.com/file/d/1yJU...ew?usp=sharing

  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
    Post 3 was moderated, I'm posting to trigger email notifications.

    I deleted the duplicate post.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Is the Multi Select Property (Properties - Other - Multi Select) of the Listbox set to None?

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  6. #6
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,115
    The link doesn't work, says I need to request access. Have you compacted the Access file then zip it and you still couldn't upload it? How big is the zip file?

    You should play with the query that is used as the row source for the list box until it returns the results you want then simply requery the list after you change the value in the combo (using the combo's AfterUpdate event).

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  7. #7
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,412
    How are you building the kit contents?
    Do you have "standard" kits?
    How many kits are there?
    Do you need to save the modified kits when users request additional items?

  8. #8
    abader is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2020
    Posts
    4
    Vlad, I got the notification for that and approved it. I assumed it would let you in. The zip file was just over 300MB, it wouldn't load in the attachment section.

  9. #9
    abader is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2020
    Posts
    4
    Dave,

    There are 6 standard kits right now. Each kit, all on one table, is related to two other tables. Once the kit and additional items are selected on the Request form, the client wants it to be auto-emailed to me and a co-worker of mine, which i haven't even attempted to figure out yet, I currently have it exporting the request form to PDF and saving on the desktop and the requestor needs to email it out.

  10. #10
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,115
    Sorry but it still doesn't work. Can you please start with a new file and import just the tables (and any queries based on them) and the form in question. Don't need much data, especially if you have pictures or attachments embedded in the database (300 MB zipped is a large file0 which I recommend against (should store the paths to the files not the files themselves).

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  11. #11
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,115
    Hi Allen,
    Please have a look at the updated file. I have added some code to email a PDF (new report) using Docmd.SendObject to a certain email (you can enter more than one, just separate them using a semi-colon) stored in a new table tblSettings.

    I have removed the two big tables so I could upload it here, just import them from your original db. I recommend you abandon the "attachement" fields and use short text to store the paths to the images instead. Loading so many pictures into the db will very soon get you to the 2GB limit for Access.

    Cheers,
    Vlad
    Attached Files Attached Files
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  12. #12
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,412
    Siemens Database-davegri-v01.zip
    See if this helps. It doesn't address all your issues, but should help with original problem. Sorry I had to remove the DB attachments to reduce size to make it uploadable.

    This form lets you define the standard Kit contents

    Click image for larger version. 

Name:	Standard.png 
Views:	15 
Size:	33.8 KB 
ID:	43430

    Then this form lets you create a custom kit based on a standard kit.

    Click image for larger version. 

Name:	custom.png 
Views:	15 
Size:	51.6 KB 
ID:	43431

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

Similar Threads

  1. Replies: 2
    Last Post: 05-25-2019, 03:42 PM
  2. Replies: 10
    Last Post: 08-19-2018, 01:22 PM
  3. Replies: 3
    Last Post: 06-16-2018, 11:12 PM
  4. want combo box content disappear after selection
    By MissVinegar in forum Forms
    Replies: 7
    Last Post: 03-15-2013, 10:40 AM
  5. Replies: 1
    Last Post: 02-03-2012, 03:51 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