access query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

if[status] = "active" then [listdate]
if [status]= 'withdrawn" or "canceled" or "expired" then [statuschangedate]
if[status]= "*pend" or "sold" then [saledate]
 
sierralightfoot said:
if[status] = "active" then [listdate]
if [status]= 'withdrawn" or "canceled" or "expired" then [statuschangedate]
if[status]= "*pend" or "sold" then [saledate]

You could use nested IIf statements to pick various outcomes based on
[status], if that's what you are trying to do.

Untested:

Expr1: IIf(status='active', listdate,
IIf(status IN ('withdrawn','canceled','expired'), statuschangedate,
IIf(status LIKE '*pend' OR status='sold',saledate,'undefined')
)
)

HTH
 
I'm sure there's a question somewhere, but I didn't find it here.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Jeff said:
I'm sure there's a question somewhere, but I didn't find it here.

Regards

Jeff Boyce
Microsoft Office/Access MVP

<forks over some fresh batteries for Jeff's crystal ball>

(^:
 
if[status] = "active" then [listdate]
if [status]= 'withdrawn" or "canceled" or "expired" then [statuschangedate]
if[status]= "*pend" or "sold" then [saledate]

Do you have a question, Sierra?

You've posted part of what looks like pseudocode - it's certainly not
an Access query, and we don't have any way to know the context or what
you're trying to accomplish.

John W. Vinson[MVP]
 
Back
Top