Hi guys I just want to know when does the OnComm() event trigger? Im new to this kind of programming and there arent that much resource I could find. Assuming I have this code:
Code:
MSComm1.Output = <command>
LogEvent() 
UpdateDatabase()

Public Sub LogEvent()
Text1.Text = <statement>
End Sub

Public Function UpdateDatabase() as Boolean
Recordset1.Open <source>, <connectionstring>, <cursortype>, <locktype>, <option>
if <condition> = True
    UpdateDatabase = True
Else
    UpdateDatabase = False
End If
End Function

Private Sub MSComm1_OnComm()
'Statement blah blah
End Sub
I have a few questions here:
1. When does the OnComm() event trigger?
2. I have a hunch that the OnComm() triggers right away when the modem responds but what happens if I have a code being executed that takes quite time (like saving or quering from the database) at the time the oncomm() would be triggering. Does this mean my OnComm() won't trigger anymore?
3. What if I have a timer, what then happens to the OnComm()?