Can any please help with concatinating several message fields into the 1 row.
from Table1 -> Table2
I have wrote the code but it doesnt work properly. Can you please check my logic or suggest your solution. Thank you.
Table 1
Policy Message
01 msg1
msg2
msg3
02 msg1
03 msg1
msg2
Table2
Policy Message
01 Msg1,Msg2,Msg3
02 Msg1
01 Msg1,Msg2
While Not tabl1.EOF()
If (Len(table1.policy) = 2) Then
LastPolicy = table1.[policy]
MessageStr = table2.[Message]
While Len(table1.policy) = 2
MessageStr = MessageStr + table1.[Message]
table1.MoveNext
Wend
With table2
.AddNew
.Fields("Policy") = LastPolicy
.Fields("Message") = MessageStr
.Update
End With
End If
Table1.MoveNext
Wend
from Table1 -> Table2
I have wrote the code but it doesnt work properly. Can you please check my logic or suggest your solution. Thank you.
Table 1
Policy Message
01 msg1
msg2
msg3
02 msg1
03 msg1
msg2
Table2
Policy Message
01 Msg1,Msg2,Msg3
02 Msg1
01 Msg1,Msg2
While Not tabl1.EOF()
If (Len(table1.policy) = 2) Then
LastPolicy = table1.[policy]
MessageStr = table2.[Message]
While Len(table1.policy) = 2
MessageStr = MessageStr + table1.[Message]
table1.MoveNext
Wend
With table2
.AddNew
.Fields("Policy") = LastPolicy
.Fields("Message") = MessageStr
.Update
End With
End If
Table1.MoveNext
Wend