Display hidden Database Window

S

Sam Kuo

Hi,
I have the SelectOject macro attached to a command button that opens up the
database window. But because I have the DW hidden by clearing "Display
Database Window" box in Tools|Startup, the DW remains hidden at all time.
Could I display DW after running the macro, without having to manually select
"unhide" from Window in toolbar? Any help is much appreciated.

SelectObject
Object Type: Form
Object Name: form1
 
A

Allen Browne

There must be another factor at work.

This code works in Access 2003 even when the database window begins hidden:
DoCmd.SelectObject acForm, "Form1", True
 
S

Sam Kuo

Along with the SelectObject action, I also have also an Echo, and a Close
action in the same macro that closes Form1. Is that the factor you mean? How
could I fix it if that's what causes the problem?

Thanks
Sam
 
A

Allen Browne

Hi Sam

We can't see your macro, or the order of actions there. To test if they are
affecting the macro, you could disable them by typing:
0
into the Condition column in macro design. (Go to the View menu if you do
not see a Condition column.)

Another way to test would be to open the Immediate Window (Ctrl+G), and
enter:
DoCmd.SelectObject acForm, , True

If that still does not work, are you able to show the database window by
pressing F11?
 
V

Van T. Dinh

In your SelectObject Macro action, make sure you set the "In Database
Window" argument to Yes / True.

I am not sure about the Echo Macro action you described. Normally, you
would use a pair of Echo actions, one to turn it off and another to turn it
back on.
 
S

Sam Kuo

Thanks! Allen and Van.

The problem is that the "In Database Window" argument was set to No. Now it
works just fine.

Much appreciated!
Sam
 

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