DreamGenius
Annoying Questionner
- Local time
- Today, 23:13
- Joined
- Jul 29, 2004
- Messages
- 116
I thought I'd post a fix rather than a question for a change.
I've been wrestling with a challenge of automagically populating a combo box based on selections made in another combo box, using the After_Update event. I've successfully achieved all that.
The challenge though was making sure that an item from the dynamic list was selected, as opposed to just showing an empty box until the dropdown was used. I did it this way:
Where strSQL is literally a SQL query constructed in the code to drive the list based on the selections made.
I hope this is helpful to somebody. Perhaps those that know more can suggest a way in which I might have done it better?
I've been wrestling with a challenge of automagically populating a combo box based on selections made in another combo box, using the After_Update event. I've successfully achieved all that.
The challenge though was making sure that an item from the dynamic list was selected, as opposed to just showing an empty box until the dropdown was used. I did it this way:
Code:
Me.cmbAutoList.RowSource = strSQL
Me.cmbAutoList.Value = Me.cmbAutoList.ItemData(0)
I hope this is helpful to somebody. Perhaps those that know more can suggest a way in which I might have done it better?