Exclude From ComboBox

ddrew

seasoned user
Local time
Today, 20:08
Joined
Jan 26, 2003
Messages
911
How do I exclude something from a ComboBox please?

My form is a profile of a dog and contains a Dog_ID. The ComboBox is a list of dogs names and shows all the females I want it to show all the females less the female that it is being linked with.
 
you'll need to populate the combobox rowsource using vba in the form current event. You haven't provided details of your current rowsource or table names/structures, so I'm using 'air' code which you will need to change to suit.

Sub Form_Current()

Code:
ComboboxName.RowSource="SELECT NameID, DogName FROM TblDogNames WHERE NameID<>" & Me.NameID & " AND DogType <>'bitch'"
 

Users who are viewing this thread

Back
Top Bottom