LittleMan22
Technical User
Currently I have the following:
Dim strComment As String
Dim rst As Recordset
Set rst = CurrentDb.OpenRecordset("CurrentClientApplicationDataPolicies"
With rst
Do Until .EOF
strComment = strComment & !Carrier & " " & !PolicyNumber & " " & !Amount & ", "
.MoveNext
Loop
.Close
End With
Me.Remarks1 = strComment
This loops through the three fields and creates a continous string of data. However, how can I get it so that the comma at the end only appears if there is to be something following it? In other words I want the comma to appear if there are two policies, but not if there is only one. I think an IFF statement may do the trick but I don't really know how to work it...
Any ideas?
Thanks again,
Ryan.
Dim strComment As String
Dim rst As Recordset
Set rst = CurrentDb.OpenRecordset("CurrentClientApplicationDataPolicies"
With rst
Do Until .EOF
strComment = strComment & !Carrier & " " & !PolicyNumber & " " & !Amount & ", "
.MoveNext
Loop
.Close
End With
Me.Remarks1 = strComment
This loops through the three fields and creates a continous string of data. However, how can I get it so that the comma at the end only appears if there is to be something following it? In other words I want the comma to appear if there are two policies, but not if there is only one. I think an IFF statement may do the trick but I don't really know how to work it...
Any ideas?
Thanks again,
Ryan.