Nope - you'll have to check each one and then cleanup at the end
Dim Temp As String
If Not IsNull([Conference]) Then
Temp = Temp & [Conference] & " - "
End If
If Not IsNull([Speaker]) Then
Temp = Temp & [Speaker] & " - "
End If
If Not IsNull(partstr) Then
Temp = Temp & partstr & " - "
End If
If Temp > "" then
Me.Title.Value = Left(Temp, Len(Temp) - 3)
Else
Me.Title.Value = Null
End If
Revised with generic function:
Public Function JoinEx(ByVal pArray As Variant, ByVal pDelimiter As String) As String
Dim sTemp As String
Dim iCtr As Integer
For iCtr = 0 To UBound(pArray)
If Not IsNull(pArray(iCtr)) Then
sTemp = sTemp & pArray(iCtr) & pDelimiter
End If
Next
If sTemp > "" Then
JoinEx = Left(sTemp, Len(sTemp) - Len(pDelimiter))
End If
End Function
Calling Example:
JoinEx(Array("one","two","three"), " - ") 'Returns "One - Two - Three"
JoinEx(Array(null,"two","three"), " - ") 'Returns "Two - Three"