issue with row source of listbox

A

Associates

Hi,

I need help with the following issue.

In the form, i have a listbox whose row source made up of two different
tables.
In one of the field i set it up as follows

Expr1: IIf(Not IsNull([Subject_Name]) Or
[Subject_Name]<>"",[Subject_Name],[OldSubject_Name])

I was trying to get it to show up in the listbox in the view mode but to no
avail. Is it to do with the fact that it's not one of the fields exist in the
table?

How do i work around this?

Thank you in advance
 
J

John W. Vinson

Hi,

I need help with the following issue.

In the form, i have a listbox whose row source made up of two different
tables.
In one of the field i set it up as follows

Expr1: IIf(Not IsNull([Subject_Name]) Or
[Subject_Name]<>"",[Subject_Name],[OldSubject_Name])

I was trying to get it to show up in the listbox in the view mode but to no
avail. Is it to do with the fact that it's not one of the fields exist in the
table?

NULL is not unequal to "". It's not equal (or unequal) to anything!

Try

Iif(NZ([Subject_Name], "") <> "", [Subject_Name], [OldSubject_Name])

Better yet, don't use Allow Zero Length in your table unless you have one of
the VERY rare cases where you must do so, dragged kicking and screaming to
turn it on. That would let you just use NZ:

NZ([Subject_Name], [OldSubject_Name])
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top