Form open in wrong view

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Dear friends,

Pls help me with the following problem.
I am trying to open a form programatically from whithin another form using a
command button in the first one.

Nothing new until now unless the second form opens in single form view
eventhough I did everything I could to open it in datasheet view and to
position it in the center of the screen.

The code used to open (from commandbutton) is:
docmd.openform strdocname, , , linkcriteria, , acwindownormal

and all the properties for the second form are properly set to open it in
dataset view.

Any help will be appreciated.
Thanks in advance.

Catalin
 
Catalin said:
Dear friends,

Pls help me with the following problem.
I am trying to open a form programatically from whithin another form using
a
command button in the first one.

Nothing new until now unless the second form opens in single form view
eventhough I did everything I could to open it in datasheet view and to
position it in the center of the screen.

The code used to open (from commandbutton) is:
docmd.openform strdocname, , , linkcriteria, , acwindownormal

and all the properties for the second form are properly set to open it in
dataset view.

Any help will be appreciated.
Thanks in advance.

Catalin

The view specified in the OpenForm call will always override the form's
settings, so you will need to specify Datasheet view in the OpenForm call:

docmd.openform strdocname, acFormDS, , linkcriteria, , acwindownormal

Carl Rapson
 
Thanks a lot.

There is another issue here. Maybe you can help me with this one as well.
The parent window is maximized and the child is not.

Whenever I switch between them, the parent gets restored and then back to
maximized after activation. I would like to keep the parent (in deactivate
state) maximized.

I mention that I have events for the parent: "on open", "on activate" with
"docmd.maximize" and for the child "docmd.restore".

Thanks again.
Catalin
 
Sorry, I'm not very familiar with those issues, but I seem to recall that
you can't keep the parent form maximized when it loses focus to a
non-maximized form, so you would be out of luck if I'm right. Maybe someone
else here knows more about that (there may be an API way to do it). If no
one responds to this thread, you could try starting a new thread with your
new question.

Carl Rapson
 
Back
Top