View Full Version : Trimming a Field


puthenveetil
05-05-2005, 10:12 PM
HI all,

Is there any way to trim a field if there is no value in that field. Now I am using this code

=Trim([District] & " Dist.")

The "Dist." is still displaying if there is no value at all.

Thanks in advance.

Thanks

maxmangion
05-05-2005, 11:57 PM
the purpose of the trim function, is to remove leading and trailing spaces ... that's why you're still getting the "Dist" part, because they are valid characters for the trim function.

Pat Hartman
05-06-2005, 06:13 PM
Try:
=[District] + " Dist."

Although the & is the standard concatenation character for VB, the + can be used in some cases. Notice that it handles nulls differently. Read the help entry on both the & and + so you understand clearly when to use which.