Listbox query criteria

M

Monte Grant

In a listbox, I'd like a Column A record to show "Yes" if both

Column B record = yes

and

Column C record = 2


Otherwise the listbox column should show "No." How do I write this
statement?
 
W

Wayne Morgan

Is the Row Source for the listbox a query? If so, try to do this in the
query by creating a calculated field.

CandB:IIf(=True And [C]=2, "Yes", "No")

You would then have a 3 column listbox with the calculated field as the
first column. The fields will fill the columns from left to right, so
arrange them in the query in the order you want them displayed.
 

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