add all to combobox - help

BrOkEn_iCe

Registered User.
Local time
Today, 01:44
Joined
May 20, 2008
Messages
18
i need some help here plz

i make combo box that show all the government and make other combo box relate to that one that show city i want to add all to the combo box i use union but it didn't work i don't know, why could u see the db and tell me why, the form is rp01
 

Attachments

Actully your Combo2 combo box is already showing "(All)" in the list but when you try to select the "(All)" option, it just displays nothing.

Try changing the "Null" in the following line of your code to 0 (zero) like:

Code:
Combo2.RowSource = "select city_id,city_name from city UNION Select 0 as AllChoice , '(All)' as Bogus from city where comp_id=Combo0"

You will then be able to select the "(All)" option and it will remain selected. Also that combo box will now return a value of 0 (zero)
 
first thank u very much for reply
when i use 0 it work good but i want that select all the city but when i chose all the report show error

so what i need to do
 
You will now need to set your sql statement to have no filtering for any value associated with this combo box when this combo box = 0 (zero) not when it has a null value
 
thx man i done it with vba cod that i make if comman if it 0 will do nothing and if it any thing else will run where function
 

Users who are viewing this thread

Back
Top Bottom