Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo.ItemData() Help

Status
Not open for further replies.

gnt

Technical User
Aug 15, 2002
94
US
Hello-
I have a combo box whose rowsource is set to an SQL statement. The SQL is SELECT Count..., so it returns a value and places it as the ItemData(0) in my combo box. I then need to use this value in an UPDATE SQL statement. Everything works fine until my SELECT statement returns no values (based on my criteria). Obviously this Null causes problems for my UPDATE query.

Is there an If statement that will change my combo.ListCount from 0 to 1 and then set Combo.ItemData(0) to 0? I've tried the Nz() everywhere I can think of and it's not working.

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top