Is there a specific reason that you want to do this, as I suspect that the model will behave as you expect without this effect?
When you click on a year, the months for which no data exists for that year are automatically excluded, and shown in the month list box with gray background. The "possible" values show with white background.
Selecting these months should make no difference to the model objects, except to change the "possible values" background to green.
I have tried this behaviour but not occurs.
I have a Time table in SQL Server with some fields like Date (the primary key), Year, Month, Day, etc. In this way, for a specific year I have certainly 12 months. I have read and stored my Time table into a QVD and then I load from the QVD selecting distinct values for year and month (I remember that Date is the PK of my Time table). Then I put the Year field into a list box and the Month field into another list box. Now, when I select a certain Year no any months is selected (in green).