Why is the OnComm event of MSCOMM32.OCX in Access 2003 VBA missing?

1.8k Views Asked by At

I've dropped the VB6 MSCOMM32.OCX (Microsoft Comm Control 6.0 (SP6)) on to a VBA form. I had to apply a Microsoft Security Update KB926857 to VB6 to get the control to drop on the form because a Windows Update set a kill bit on the older version.

When I look at the object's events in VBA I do not have "OnComm" available. I can get it in VB6 by double clicking its icon (a phone) but not in VBA. Importing it in Delphi shows OnComm as the only event handler.

I know the control is registered properly and licensed.

I've done it a couple of years ago with the older control, but has anybody done this lately?

Available Events: OnEnter, OnExit, OnGetFocus, OnLostFocus & OnUpdated

1

There are 1 best solutions below

1
On BEST ANSWER

I discovered independently that HK1's suggestion was correct. I created an event handler that looked like this

Private Sub MSComm1_OnComm()

Nothing needed to be done to the object properties to link it to the routine.

In the form load event I placed an MSCOMM1.PortOpen = True. I scanned a bar code and presto it worked.

Why this is treaded differently than other events I do not know and how/where it is documented is a mystery.

This Microsoft site has helpful information on handling the data properly and is what I used for the test.

http://support.microsoft.com/kb/194922