When you use plug-in technology, use to tell FORMS which events you want to subscribe to (use) on a certain object ObjectName. This method is useful if you only for a certain Form or Field want to do something and not on all Forms or Fields processed. If you want your plug-in to be called every time an event is fired no matter on what object, use the Subscribe method.
[ReturnValue =] Object.SubscribeToObejct(Handler, EventName, ObjectName, HandlerFunction)
|
Part |
Data type |
Description |
|
Object |
Object |
An object expression that evaluates to one of these objects. |
|
Handler |
Object |
A handle to your plug-in module. |
|
EventName |
String |
The name of the event, for example FormComplete. |
|
ObjectName |
String |
The name of a Field or Form. |
|
HandlerFunction |
String |
The name of the function in your plug-in that will execute when the EventName event is fired. |
Data type: Long. -1 is returned when the method fails, for example when the EventName is misspelled.
'** Subscribe to FormComplete for the form named "PTicket"
call Application.SubscribeToObject( Me, "FormComplete", "PTicket", _
"OnFormCompletePTicket")