Monday, February 13, 2012

"Decode on rowsource for listbox"

Hi.

I have coded the rowsource for my listbox and I need some sort of "decode" function within my SELECT statement. Can someone help?

For example,

Teacher is a checkbox which contains 0 and 1
I need the listbox to show the word "Teacher" if teacher = 1; else show "Assistant"

mylstbox.rowsource = "SELECT Teacher From mytable"

Statement above populates my listbox with 0 or 1. However, I need the word "Teacher" or "Assistant" to show on the listbox.

Help!

Thanks

SHKI found the dolution by using "case when then else"

No comments:

Post a Comment