code execution does not stop with a modal? form

  • Thread starter Thread starter oldguy
  • Start date Start date
O

oldguy

Hi,

Using Access 2002 on WinXP.

I have an unbound form in which the code supposed to open a bound modal form
in datasheet view. I expect code in form 1 to stop running until the form 2
is closed, but it does not.

The only thing that I could detect is that if I do not include acFormDS as
the windowmode argument in the code when I open the form (DoCmd.OpenForm
"formname", , , , , acDialog), then the command works as expected. However,
I want to open the form 2 in datasheet view.

I have experimented with various combinations of the form's popup, modal,
and default view parameters, and also with some arguments of the OpenForm
command. The form opens either in normal view (code stops), or in datasheet
view (code continues).

I have looked around on the Internet, but I was unable to find any
information leading to the fix of this behaviour.

Any advice will be welcome.

Engin Tarhan
 
oldguy said:
Hi,

Using Access 2002 on WinXP.

I have an unbound form in which the code supposed to open a bound
modal form in datasheet view. I expect code in form 1 to stop running
until the form 2 is closed, but it does not.

The only thing that I could detect is that if I do not include
acFormDS as the windowmode argument in the code when I open the form
(DoCmd.OpenForm "formname", , , , , acDialog), then the command works
as expected. However, I want to open the form 2 in datasheet view.

I have experimented with various combinations of the form's popup,
modal, and default view parameters, and also with some arguments of
the OpenForm command. The form opens either in normal view (code
stops), or in datasheet view (code continues).

I have looked around on the Internet, but I was unable to find any
information leading to the fix of this behaviour.

What you're describing is opening a form with the acDialog argument which is a
bit more than "modal" as a modal form (by itself) does not halt code execution.

For some reason a form cannot be opened with acDialog and be a datasheet at the
same time. Try a continuous form set up to *look* like a datasheet.
 
Thanks Rick.

Engin

Rick Brandt said:
What you're describing is opening a form with the acDialog argument which
is a bit more than "modal" as a modal form (by itself) does not halt code
execution.

For some reason a form cannot be opened with acDialog and be a datasheet
at the same time. Try a continuous form set up to *look* like a
datasheet.
 
Back
Top