Hiding Database window

P

Pele

I have written a macro to import a table into a database.
If the contents of the imported table are not complete,
the macro will then open a query, RunCommand (Windowhide)
and then STOP the macro. The user can then print off the
opened query to use in fixing the imported query.

My problem is that when the User closes the opened query,
the database window is now displayed (INSTEAD of the
Switchboard). Can anybody tell me how to ensure that the
database window stays hidden and that the focus goes to
the Switchboard once the opened query has been closed.

Pele
 
P

Pele

Hi Jim,

I had actually unchecked the Display Database window and
then I selected the Switchboard as the form to display. Is
there anything else I should do.

Note that the Macro opened the database window since it
needs to select and delete objects and also open queries.

If it was a form that was opened, I could have hidden the
database window when the form was closed, but since I
opened a query before the macro stopped, I can't force the
database window to close after the query has been closed.

Pele
 
P

Pele

Jim,

I accidentaly figured out how to solve the problem. I'd
initially put the RunCommand (Windowhide) Action after I'd
opened the query, but when I closed the Database window
before I ran the OpenQuery action, the problem was solved
i.e. the database still remained hidden after the query
was closed.

Pele
 

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