From: alex on
Close on Lost Focus

Hello,

I have a pop up/modal form that opens on top of another form/subform.
I need this form to be modal, but, because it’s in ds view the modal
property does not work (continuous forms would be a pain...).

When the pop up opens, the title bar is blue (which I assume is
indicative to having focus). As a workaround to the modal issue, when
the title bar turns grey (pop up loses focus; e.g., user clicks
outside the form) I want it to close.

I can’t seem to code it, however; i.e., on lost focus will not close
the form!

Suggestions…

Thanks,
alex
From: Jeanette Cunningham on
Try using acDialog mode.
The code that opens the form would be something like this
DoCmd.OpenForm "FormName", , , "[ID] = " & Me.[ID], , acDialog

Put a close button on the form
DoCmd.Close acForm, Me.Name

Once the popup has opened, all other forms stop until user closes the popup
form.
As soon as user clicks the close button on the popup it closes and code on
the next active form will run.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia



"alex" <sql_aid(a)yahoo.com> wrote in message
news:29a2ddca-fb8d-4f61-a654-c9c9b7096235(a)k19g2000yqc.googlegroups.com...
Close on Lost Focus

Hello,

I have a pop up/modal form that opens on top of another form/subform.
I need this form to be modal, but, because it�s in ds view the modal
property does not work (continuous forms would be a pain...).

When the pop up opens, the title bar is blue (which I assume is
indicative to having focus). As a workaround to the modal issue, when
the title bar turns grey (pop up loses focus; e.g., user clicks
outside the form) I want it to close.

I can�t seem to code it, however; i.e., on lost focus will not close
the form!

Suggestions�

Thanks,
alex


From: alex on
On Feb 3, 6:12 pm, "Jeanette Cunningham"
<n...(a)discussions.microsoft.com> wrote:
> Try using acDialog mode.
> The code that opens the form would be something like this
> DoCmd.OpenForm "FormName", , , "[ID] = " & Me.[ID], , acDialog
>
> Put a close button on the form
> DoCmd.Close acForm, Me.Name
>
> Once the popup has opened, all other forms stop until user closes the popup
> form.
> As soon as user clicks the close button on the popup it closes and code on
> the next active form will run.
>
> Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
>
> "alex" <sql_...(a)yahoo.com> wrote in message
>
> news:29a2ddca-fb8d-4f61-a654-c9c9b7096235(a)k19g2000yqc.googlegroups.com...
> Close on Lost Focus
>
> Hello,
>
> I have a pop up/modal form that opens on top of another form/subform.
> I need this form to be modal, but, because it’s in ds view the modal
> property does not work (continuous forms would be a pain...).
>
> When the pop up opens, the title bar is blue (which I assume is
> indicative to having focus).  As a workaround to the modal issue, when
> the title bar turns grey (pop up loses focus; e.g., user clicks
> outside the form) I want it to close.
>
> I can’t seem to code it, however; i.e., on lost focus will not close
> the form!
>
> Suggestions…
>
> Thanks,
> alex

Jeanette,
acDialog did the trick...that's all I needed to do!
Thanks for the help,
alex
 | 
Pages: 1
Prev: Access 2007 User Lock Problem
Next: fill column