Link to home
Start Free TrialLog in
Avatar of mustish1
mustish1

asked on

Wrap String

Hi: This is the the string.
TxtString1 = "DBTRADDR" & "," & mAddress1A & "," & mAddress1B & "," & mCity1 & "," & mState1 & "," & mZip1 _
& "," & """"

And this is the result
DBTRADDR,100 E GRAND BLVD STE 100,"",CORONA,CA,928792222,""

My question is how to i put a double quotation mark around each field. Even if there is a value or no value in it. It must be wrap with double quotation mark like that. I try it but it not wrap the fields which have value in it.
DBTRADDR,"100 E GRAND BLVD STE 100","","CORONA","CA","928792222",""

Thanks.

TxtString1 = "DBTRADDR" & "," & iif (IsNull(mAddress1A), chr(34) & chr(34), mAddress1A) & "," &  iif (IsNull(mAddress1B), chr(34) & chr(34), mAddress1B) & "," &  iif (IsNull(mCity1), chr(34) & chr(34), mCity1) & "," &  iif (isNull(mState1) , chr(34) & chr(34), mState1) & "," &  iif (isNull(mZip1), chr(34) & chr(34), mZip1) _
& "," & """"
ASKER CERTIFIED SOLUTION
Avatar of kingtam2000
kingtam2000

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial