• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Dynamic multi-column comboboxes

andreabezt

New Member
Hi,
I'm an MS Access vba programmer of 20+years and one of my users wants me to create a spreadsheet for her. What is so easy in Access now makes me want to pull out my hair. Can you please help?

It is a bit complex, so I've attached an example of what I'm trying to do. Maybe you have a better idea, else, please help!!!

There are 3 tabs, one holds my data, which I get from a SQL database via ADODB in vba. No problem there, I post the data on the "MYDATA" sheet. I've created a simple matrix of my data as an example.

I've created a list of months in MYLISTS tab because those are static.

On my display is my problem.

The first combobox is just the months of the year.

I then use the result of this combobox to get all the entries from the matrix where the month in the first column = the choice of the combobox.

I used the additem method, but then it adds just the name in column B of the matrix. Which is fine, but, I really want the entire row of data, because I want to display columns c, d, e and f, in I4, I5, I6 and I7 on the MYDISPLAY sheet, based on the name picked in the second combobox.

Sorry if it is confusing, I hope it makes sense. Is there a way I can do this and how?

Thank you so much!

Andreabezt
 

Attachments

  • ComboExample.xlsx
    16.5 KB · Views: 6
andreabezt
Instead of those ActiveX comboboxes
( which I cannot use at all )
could You try to use dropdowns like in this sample?
 

Attachments

  • ComboExample.xlsb
    24.9 KB · Views: 10
Hi, Thank you so much for your reply and sorry for replying so late, I got a bit busy today and haven't had time to look until now. I've certainly learnt a lot, thank you! Question, are you using data validation to make the drop downs?
 
andreabezt
Yes
- as I tried to ask
-- could You try to use dropdowns like in this sample?
Hint -- If You start to wonder, why some data do not show - then You should check You data.
 
Hi, yes, I've tried to use the dropdowns in your sample, I just wanted to make sure I was using the correct thing. I've simulated most of it, but it isn't catching the correct stuff yet :), however, your sample really taught me so much, thank you for that. I'm going through it line by line and testing as I go to see how it all fits together. You have been a tremendous help, thanks again!
 
Back
Top