Display database window

J

JCP

How can I detect programmatically if the mdb file was open with database
window visible or hide?

Thanks
jcp
 
6

'69 Camaro

Hi, Jose.
How can I detect programmatically if the mdb file was open with database
window visible or hide?

One cannot check whether the file opened with the Database Window visible or
not. One can only check what the current setting is after the file is
opened. In the Immediate Window, paste the following code:

? CurrentDb().Properties("StartUpShowDBWindow").Value

If the result is TRUE, then the Database Window will be visible next time
the database is opened. If the result is FALSE, then Database Window will
be hidden next time the database is opened. Keep in mind that the setting
can be changed by the user before the database is closed, so it's not set in
stone.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
Blogs: www.DataDevilDog.BlogSpot.com, www.DatabaseTips.BlogSpot.com
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
info.
 
J

JCP

I tested but something is wrong, always the result is 0 (false)
I used currentproject.Properties("StartUpShowDBWindow").Value because I'm
working with adp.

I need this because I have a MenuRpt form should be keep always open.
I get help from froms.coding group to use an event on unload.
I did, it works but I have a problem. If I open it, off course I can't close
this is what I want, but I can't go to design view.
The database is not finish, I'm working with it.
That's why I need detect if database was open with database window visible
or not to add the result to the event on unload.

I don't why, the result always is 0.
 
J

JCP

I check my adp and the result always is 0 because in tools menu/startup I set
false.
If I want to open the database to do modifications I need to press shift F11.

Question
How can I know if I open the database pressing shift F11? (database
window=true)

Thanks
 
6

'69 Camaro

Hi, Jose.
I tested but something is wrong, always the result is 0 (false)
I used currentproject.Properties("StartUpShowDBWindow").Value because I'm
working with adp.

That means that the current startup setting has the "Display Database
Window" unchecked. Select the Tools -> Startup... menu to open the Startup
dialog window and mark the "Display Database Window" check box, then press
the "OK" button to save the change. When you check its value in the
Immediate window, you'll see that the result is TRUE (-1).

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
Blogs: www.DataDevilDog.BlogSpot.com, www.DatabaseTips.BlogSpot.com
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
info.
 

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