Hi all. I'm writing a program which is connected to Fire Alarm System via serial port. The Fire Alarm System will send me data like shown below. I also attach a screenshot of the data from FAS received in Hyper Terminal.

My program needs to send "0" or "1" via DDE to another program based on the FAS message. Referring to the above message and the screenshot,
"COMMON TRBL RST" is the message to reset an alarm, "COMMON TRBL ACT" is the message to activate an alarm and "D:0137" is the locationID.
My program needs to send the status via DDE based on the "... RST" or "...ACT" message and the locationID.

Upon startup, my program will read from a config file for the available ACT message, RST message and a list of locationIDs.

I am encountering a few issues:
1) In my MSCOMM1_OnComm event, using breakpoint, i notice that my program always receives just the portion of the FAS message, for e.g., I'll receive only "COM" at one time and then, I press F5 to carry on. Next time, I'll receive another portion of the whole chunk like "MON TRBL RST... ...". Because of this, i can't capture any alarm ACT or alarm RST at all. How can i ensure i don't lose any data from FAS?

2) If I can solve the first issue, please suggest to me the most efficient way to process the chunk of data received by my program.

//totalPoint is the total venues/LocationIDs
For j = 1 To totalPoint
If alarmLocation <> 0 Then
//Send 1 via DDE to a program if point j is an alarm
If InStr(strBuffer, PointAddress(j)) > 0 Then
txtPoint(j).Text = "1"
txtPoint(j).LinkMode = vbLinkManual
txtPoint(j).LinkPoke
End If
ElseIf normalLocation <> 0 Then
//Send 0 via DDE to a program if point j is an alarm
If InStr(strBuffer, PointAddress(j)) > 0 Then
txtPoint(j).Text = "0"
txtPoint(j).LinkMode = vbLinkManual
txtPoint(j).LinkPoke
End If
Else
Exit For
End If
Next j
Next i
tTerminal.Text = ""
strBuffer = ""
End If
End Select