Open Form on Close of RelationShip Window

skea

Registered User.
Local time
Today, 19:07
Joined
Dec 21, 2004
Messages
341
Folks,
i open my relationship window from a form and i after hide its visibility using the code below.
Code:
DoCmd.RunCommand acCmdRelationships
Forms![frmRelations].Visible = False
I need to open the hidden form after clicking on the close(x) button of the relationship window.
Are there any ideas please.
 
Your problem is EVENTS. You cannot put an event on the Relationship window to track the fact that it went away. The relationship window, not being a form, has no place to put a class module that could trap the window-close event. If you get no event you cannot take any special action. Since you are hiding your form after you open the relationships window, the form (being hidden) cannot get focus back.

I advise you to rethink this issue slightly. Any method that is going to stop you from using a Form_GotFocus event is going to eat your socks. Perhaps what you need to do is open the relationships window maximized and on top of the desktop. It will HIDE your form simply because it is on top and is opaque. Then you could try trapping a Form_GotFocus event to do whatever you were going to do when the relationships window closes.
 
thanks Doc Man,
the form frmRelations is a popup. So my relationship window falls behind it.
Even if i meant not to make it invisible, i wouldn'd meet its purpose.
Any more ideas to capture the close event of that Relationships window.
 

Users who are viewing this thread

Back
Top Bottom