Questions on Using Custom Events

  • Thread starter Thread starter Jay Chan
  • Start date Start date
J

Jay Chan

I have a couple questions on using custom events:

- I am trying to use custom-events to post messages between two
forms. But this causes a "Circular Dependency" error. I can post
messages from form-A to form-B, or from form-B to form-A. But I cannot
setup custom events to post messages _between_ form-A and form-B. If I
do, I will get a "circular dependency" error message when I attempt to
add a custom-event-handler. Is there a way to avoid this problem?

- Am I actually SENDing a message or POSTing a message when I raise
a custom-event? I am trying to have form-A post a message to form-B
and then finish whatever form-A needs to do, and then I would like
form-B to take care of that message _after_ form-A is done. Is
custom-event the right way to accomplish this?

- Do I have to use PostMessage() Win-API to post a message?

Thanks.

Jay Chan
 
Are you referring to something about a Query using an Access Database?

Circular Dependency errors are typically an Excel problem. You may want to
repost your question in an Excel newsgroup.


--
HTH,

Steve Clark, Access MVP
FMS, Inc.
Professional Solutions Group
http://www.FMSInc.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Is your Access database too slow?
Are you ready to upgrade to SQL Server?
Contact us for optimization and/or upsizing!
http://www.FMSInc.com/consulting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
Are you referring to something about a Query using an Access Database?
Circular Dependency errors are typically an Excel problem. You may want to
repost your question in an Excel newsgroup.

No, this has nothing to do with Query nor Excel.

This has to do with using Custom-Event in forms in MS Access. The
"Circular Dependency" error message comes up when I am putting
custom-event-handler into the second form (after I have placed
custom-event-handlers in the first form). This occurs in "design"
time, not in "run" time.

Basically, my program has these custom-events:

Form-A-Raises-Custom-Event-A
---> Event-Handler-A-in-Form-B-Handles-Custom-Event-A

Form-B-Raises-Custom-Event-B
---> Event-Handler-B-in-Form-A-Handles-Custom-Event-B

Somehow, MS-Access may think that my program was doing this (or has
the potential of doing this):

Form-A-Raises-Custom-Event-A
---> Event-Handler-A-in-Form-B-Handles-Custom-Event-A
And it "showhow" raises custom-event-B
---> Event-Handler-B-in-Form-A-Handles-Custom-Event-B

Seem like MS Access thinks that there is this "cicrular dependency"
going on. But in fact there is not any "circular dependency" between
form-A and form-B.

Jay Chan
 
Back
Top