Substituting values in a query

G

Gez

Hi,

There's an option in the word object library to surpressing blank lines when
automating a mail merge. The problem is that within my database instead of
blank fields I have values "N/A". This is by design as they are the default
values in corresponding Lookup Tables for Town, Region and Country. Is
there any way of creating an expression within a query that substitues one
value for another e.g. expr: if fldCountryName = "N/A" then expr = "".

Thanks,

Geraint
 
G

Gez

Forget that question I've just done it by adding the following expression to
the query:

Expr1: IIf([fldCountryName]="n/a","",[fldCountryName])
 
J

John Vinson

Is
there any way of creating an expression within a query that substitues one
value for another e.g. expr: if fldCountryName = "N/A" then expr = "".

Sure:

IIF([fldCountryName] = "N/A", "", [fldCountryName])

I have to be a bit dubious about your default lookup values though!
 

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