By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,548 Members | 1,183 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,548 IT Pros & Developers. It's quick & easy.

Mutliple Event Sink problem

P: n/a
Hi there,

I read this in the Access 2002 help file:

'The class that raises an event is the event source, and the classes that
implement the event are the sinks. An event source can have multiple sinks
for the events it generates. When the class raises the event, that event is
fired on every class that has elected to sink events for that instance of
the object.'

So I want one form to raise an event, and a second form to respond to the
event. This says I should be able to do it, but I can't seem to make it
work. I can get the form which raises the event to respond, but not the
second one.

What I've got so far is this, so where do I go from here to get other forms
to respond to the same event?

Thanks a lot in advance ... Mike

In a class called TestEvent
Public Event RefreshDetail()

Public Sub Refresh()
RaiseEvent RefreshDetail
End Sub

In Form1:
Public WithEvents Testing As TestEvent

Private Sub Form_Load()
Set Testing = New TestEvent
End Sub

Private Sub EvDetail_DblClick(Cancel As Integer)
End Sub

Sub Testing_RefreshDetail()
MsgBox "test from list"
End Sub

Nov 12 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.