Concantenation and Null Values

Marbinski

Registered User.
Local time
Today, 03:05
Joined
Aug 24, 2004
Messages
45
I have a report where I want to place parentheses around a field in my query.

I have used concantenation w/ the & and got it working fine. But, my problem comes where the value of the field is null. On the report intead of having my field value w/ parentheses I just have the parentheses.

Example of Report(w/ value):

Marvin (Access Programmer)

Example of Report (w/ null value):


Marvin ()

Basically, I'm just looking for some query code that only shows the parentheses if the value is not null. Otherwise I just want the field blank w/out the added concantenated characters.

Here is my original code:
QUERY VALUE: '(' & [TABLENAME]![FIELDNAME] & ')'


Please help....thanks in advance.
 
Since Null + anything is Null, you can use + instead of &.

.
 
Thanks a lot, works fine. This is a great tip for me to use later....
 

Users who are viewing this thread

Back
Top Bottom