|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Blank Line Collapse
I have the usual fields for address and I want to create a mail label field.
In Control Source of my label field I have: =[title] & " " & [fName] & " " & [lname] & " " & [addLine1] & " " & [addLine2] & " " & [town] & " " & [state] & " " & [postCode] How can I make it so addLine2 does not take a blank line if there is no addLine2. I figure you can plant a little if statement in the expression. And I guess it really is about making the newline character conditional on there being text in addLine2. Any thoughts? |
|
#2
|
|||
|
|||
|
building expression in code
Code:
if [addLine2] = "" or [addLine2] is null then =[title] & " " & [fName] & " " & [lname] & " " & [addLine1] & " " & [town] & " " & [state] & " " & [postCode] Else =[title] & " " & [fName] & " " & [lname] & " " & [addLine1] & " " & [addLine2] & " " & [town] & " " & [state] & " " & [postCode] endif builing expression in query builder Code:
=IIF([addLine2] = "" or [addLine2] is null, [title] & " " & [fName] & " " & [lname] & " " & [addLine1] & " " & [town] & " " & [state] & " " & [postCode], [title] & " " & [fName] & " " & [lname] & " " & [addLine1] & " " & [addLine2] & " " & [town] & " " & [state] & " " & [postCode]) S- |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft Access Help > Blank Line Collapse |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|