473,322 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Database Window Currently Showing

NeoPa
32,556 Expert Mod 16PB
Does anyone know where I could find the visible status of the Database Window (from code)?

I have code to hide it specifically, but to hide it, one must first select it, which shows it. This causes it to flash briefly on the screen (if it was already hidden) and frankly, looks unprofessional.
Expand|Select|Wrap|Line Numbers
  1. Call DoCmd.SelectObject(ObjectType:=acForm, InDatabaseWindow:=True)
  2. Call DoCmd.RunCommand(Command:=acCmdWindowHide)
Jan 28 '09 #1
6 2306
Stewart Ross
2,545 Expert Mod 2GB
Hi NeoPa. I have not found any property which reflects the current visibility status of the database window that could be toggled in real time to show or hide the window. There is no indication of any such property available within Access in any of the sources I've trawled so far (including MSDN and the MS knowledge base).

As I'm sure you know the norm in hiding the database window is to untick the Display Database Window tickbox in the Tools, Startup options of the database. Doing so sets the StartupShowDBWindow property in the Properties collection of the CurrentDB object which is available in code (see for example MSDN article http://msdn.microsoft.com/en-us/libr...ffice.10).aspx).

The current value can be shown in the immediate window of the VBE by typing

? CurrentDB.Properties("StartupShowDBWindow")

This property can be set True or False in VBA, but any change does not take effect until the next startup, and is no different to ticking or unticking the option in the Tools, Startup window anyway.

The only other option I know of to hide the window is to use an Autoexec macro to do so on startup - but the need for this use of autoexec was really superseded when the Display Database Window property was made available as part of the startup options from A2000 on I guess.

I know you are seeking a means of hiding the window without using the selection method that you show in your question first. Perhaps you are running a process that has led to the DB window becoming visible (for example, by reattaching tables), so you need to hide it again. So far, the method you are using is very similar to those recommended by other Access experts such as Allen Browne for this purpose.

-Stewart
Jan 28 '09 #2
puppydogbuddy
1,923 Expert 1GB
Hi Adrian and Stewart,
If I recall correctly, the InDatabaseWindow argument of the select object statement can be set to False to hide the db window as shown below:

DoCmd.SelectObject acForm, "Any Form in YourDB", False

pDog
Jan 28 '09 #3
mshmyob
904 Expert 512MB
Check this link out.

http://www.mvps.org/access/api/api0069.htm

cheers,
Jan 28 '09 #4
NeoPa
32,556 Expert Mod 16PB
@Stewart Ross Inverness
Hi Stewart. Thanks for this.

I am already setting the StartupShowDBWindow property manually, but I can change that if/when needed from code. I can also hide and unhide the database window from code when necessary (I use this in certain circumstances).

My intention is to run the "Hide database window" code only when it's currently showing, as when it is run in the situation where the database window is already hidden, it causes a noticeable flicker. Hence I need to check this status before running the code.

Showing the db window is never a problem, just having to show it before hiding it is a little messy.

I really appreciate your spending your time to help. And that goes for all who've posted too of course.
Jan 28 '09 #5
NeoPa
32,556 Expert Mod 16PB
@puppydogbuddy
I believe that shows the named form pDog, rather than the database window. If the parameter is true it simply shows the database window but with the specified object selected.

I'm really not trying to sound ungrateful here. I do appreciate all comments :)
Jan 28 '09 #6
NeoPa
32,556 Expert Mod 16PB
@mshmyob
This looks like something I can build on mshmyob.

It also confirms my suspicion that this particular facility is NOT provided by Access itself (for some reason).

I will do some further digging and see if I can understand exactly how it's working and come up with some code of my own I'll be able to post :)
Jan 28 '09 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: Kai Grossjohann | last post by:
It seems that Ctrl-N in Mozilla opens a new empty browser window. That's fine, I don't need to do anything about it. But Ctrl-N in IE appears to clone the current window. Is there a way to...
6
by: Noozer | last post by:
We have a web based tool used to report issues in our office. Many times the users do not enter the required information to deal with the issue. Unfortunately we don't have control of this...
5
by: GEL | last post by:
Hi, I want to open a new browser window, let the user use that window for several minutes, and when they close, I'd like to change the page displayed in the original window. According to...
7
by: Shannon Rotz | last post by:
All of a sudden when I open any Access database, I can't view the database window. This includes databases where I have hidden the database window on startup, and those that I haven't. I think...
3
by: Nolan Madson | last post by:
Can someone point me to a definition of a "database map"? My understanding is that it is a higher level diagram showing the relationship of business subject areas to tables in a database....
9
by: Wayne Smith | last post by:
I've come up against a major headache that I can't seem to find a solution for but I'm sure there must be a workaround and I would really be grateful of any help. I'm currently building a web...
11
by: Nick 'The database Guy' | last post by:
Hi People, How do you go about hiding the database window. The reason for doing this is that sometimes have to manually add data to tables. I have a fully interatctive menu system from which...
2
by: Parasyke | last post by:
A new problem has me puzzled. I have what appears to be a very stable database but suddenly I can't find my Database Window. I tried the Startup option of Display Database Window and hit the...
2
by: lucky33 | last post by:
I am having a problem with locating my database window. I click on the database window in the toolbar but the database window does not pop up. I checked under tools and startup and the check is...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.