A
AccessVandal via AccessMonster.com
Dirk,
I think I found the problem. Your first clue was this.
DoCmd.SelectObject acTable, , True
I was wondering, why select a table/form? You got me thinking of retracing
the steps of the original error.
When I first created a new database, by default A2007 create an unnamed table,
close the table without saving. Create a new form – events on buttons or
events on form.
I ran the form without saving. The problem appears. This is not an error as I
soon discovered.
The acCmdWindowHide is the puzzle. What does it do? I my opinion, it does not
truly hide the Navigation Pane at all. What does the Navigation Pane in
Access Option do than?
Back to the form, the selectobject hit me. It dawn to me that acCmdWindowHide
needs an existing object in the Nav Pane! AcCmdWindowHide needs a saved
object in the Nav Pane else the command will fail but not completely.
What do I mean “not completely�
Well the Nav Pane is still visible. The unsaved form was hidden!
This means that “DoCmd.RunCommand acCmdWindowHide†will hide a window or an
opened window form and as well as the Nav Pane. But if there’s nothing the
Nav Pane, the command will hide the current form window.
In my opinion, the acCmdWindowHide command is best use with precaution.
Dirk Goldgar wrote:
snip..
I think I found the problem. Your first clue was this.
DoCmd.SelectObject acTable, , True
I was wondering, why select a table/form? You got me thinking of retracing
the steps of the original error.
When I first created a new database, by default A2007 create an unnamed table,
close the table without saving. Create a new form – events on buttons or
events on form.
I ran the form without saving. The problem appears. This is not an error as I
soon discovered.
The acCmdWindowHide is the puzzle. What does it do? I my opinion, it does not
truly hide the Navigation Pane at all. What does the Navigation Pane in
Access Option do than?
Back to the form, the selectobject hit me. It dawn to me that acCmdWindowHide
needs an existing object in the Nav Pane! AcCmdWindowHide needs a saved
object in the Nav Pane else the command will fail but not completely.
What do I mean “not completely�
Well the Nav Pane is still visible. The unsaved form was hidden!
This means that “DoCmd.RunCommand acCmdWindowHide†will hide a window or an
opened window form and as well as the Nav Pane. But if there’s nothing the
Nav Pane, the command will hide the current form window.
In my opinion, the acCmdWindowHide command is best use with precaution.
Dirk Goldgar wrote:
snip..