Discussion Locked

Create Access 2000 Combo Box via VBA Mod

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I would like to use a VBA module to create my combo box on a form. I would like to base the value list of that combo box on the contents of another control. For example, if Control "X" = "Biological" then the combo box should contain a list of items pertaining to Biology. Otherwise, if Control "X" contains the word "Physical", the combo box would provide a different list. How can I do that?

3 replies

by john_wills

select case me.BoxAlreadyFilledIn
case "Physics"
me.BoxToDefine.RowSource="SELECT Thing FROM PhysicsTable;"
case "Metaphysics"
me.BoxToDefine.RowSource="SELECT Res FROM MetaphysicsTable;"
case "Art"
me.BoxToDefine.RowSource="SELECT objet FROM ArtTAble;"....etc.

This discussion is closed to new replies.