code execution does not stop with a modal? form

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
 
R

Rick Brandt

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.
 
O

oldguy

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top