conditional concatenation of fields

  • Thread starter Thread starter the_dude via AccessMonster.com
  • Start date Start date
T

the_dude via AccessMonster.com

Hello,

I have the following problem. I have two 'age' fields in my DB. Usually only
one of them contains data and Concatenation is simple. But every now and then
they both contain data and the concatenation gives me '5454 rather then 54'.

I have tried an IIf statement like this: IIf(IsNotNull([AGE]) And (IsNotNull(
[Given_Age]),[AGE]))

but this does not work. Does anyone know a statement to solve this problem?

Thank you very much in advance.
 
Why not use:
Nz([AGE], [Given_Age])

If AGE is null, it will use Given_Age instead.
 
You might try using the NZ function
NZ(AGE,Given_Age)

This returns AGE if it has a value and Given_Age otherwise. If both are
null, then it returns null
 
Back
Top