"Dirk Goldgar" wrote:
> "Vexen Crabtree" <(E-Mail Removed)> wrote:
> > The form in question (F_URL) is always instantiated by a routine in global
> > module, and a reference to the form is held in a global collection.
<snip>
<snip>
> HOWEVER, it did not fire if the form's PopUp property was set to Yes (True).
> I recall this from the behavior of ordinary, default instances of forms --
> the Activate event doesn't fire for PopUp forms. Is your form F_URL a popup
> form, by any chance?
YES, that is it!!! When I set PopUp to false in design time, the Activate
event then fires.
But when PopUp is false the form always opens Maximized. There are no
Minimize or Restore buttons, and, if I stick DoCmd.Restore in the Activate
event, it doesn't do anything (no error either).
DoCmd.OpenForm "F_URL", acNormal, , , , acWindowNormal
and
Set epForm = New Form_F_URL
.... both open it in full screen... I've played with settings like AutoSize,
Width (worth a try) and checked that the ShowRestore and ShowMinimize
properties are set to true. This seems like something I should remember, but,
if PopUp=false, does that mean the form has to be maximized?
The point of these windows is that settings and text-editting can be done on
multiple instances of F_URL, side-by-side, frequently switching between them.
Unfortunately, having F_URL maximized is an even bigger problem than the
Activate event not firing!
Is it the case that (therefore!) the Activate event only fires for
maximized/non-PopUp windows?
Test users are now getting used to clicking a "Set Focus" command
(Cmd_DoActivate) button manually after switching between windows... on some
of the most-frequently used text fields in F_URL, I have implemented code in
OnChange that manually fires .Activate to help in times when the user doesn't
click Cmd_DoActivate... I could *also* do a timer that runs every 2 seconds
or something to capture Screen.ActiveForm, and pretty much bypass the need to
get the Activate event working.
> --
> Dirk Goldgar, MS Access MVP
> Access tips: www.datagnostics.com/tips.html
>
> (please reply to the newsgroup)
>