I have a list of fields from an online form that I want to display in the body of an e:mail. I only want fields with data to be there. How can I use vbscripts For Each to add the line to the body variable only if there is data in the field? See list below of current body of which I'd like to suppress blank lines:
Thanks!![[ponytails2] [ponytails2] [ponytails2]](/data/assets/smilies/ponytails2.gif)
Code:
body = "An entry for " & txtDoctorName & " has been submitted by " & auth_user & " in " & deptx
& " on " & datex & vbcrlf & vbcrlf _
& "Physician Name: " & namex & vbcrlf _
& "Title: " & titlex & vbcrlf _
& "UPIN: " & upinx & vbcrlf _
& "SSN: " & ssnx & vbcrlf _
& "Number: " & numberx
Thanks!
![[ponytails2] [ponytails2] [ponytails2]](/data/assets/smilies/ponytails2.gif)