[AccessD] Programmatically Hide the DATABASE Window

Paul Rodgers Paul.Rogers at SummitMedia.co.uk
Thu Aug 5 08:41:58 CDT 2004


Thanks, Drew, all noted.

-----Original Message-----
From: DWUTKA at marlow.com [mailto:DWUTKA at marlow.com]
Sent: Wednesday, August 04, 2004 6:01 PM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] Programmatically Hide the DATABASE Window


There's one of two methods that can be used for Access 2000.  One method is
to turn the Modal property of your forms to Yes (along with the Popup to
Yes, which 97 also needs).  However, you can also use the ShowWindow API,
again, after you hide the Access window, to show the form again.

The 'Always On Top' example database on my site does that, though it also
sets the Zorder of the window to -1, which makes the form stay on top of all
of the other windows on your desktop, which is probably overkill for what
you want.

One warning, when hiding Access, reports cannot be previewed.  They can be
printed, but if previewed, they will show up within the 'hidden' Access
window.  So if you are going to allow the users to preview reports, you will
need to display the Access window for the user (just have the On close event
of the reports hide Access again.

Drew

 -----Original Message-----
From: 	accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]  On Behalf Of Paul Rodgers
Sent:	Wednesday, August 04, 2004 4:48 AM
To:	'Access Developers discussion and problem solving'
Subject:	RE: [AccessD] Programmatically Hide the DATABASE Window

Quite amazing, Drew, but when converted to 2k it doesn't go exactly right -
or it may be this computer. Anyway, I certainly see what you mean. Thank
you.  (I'll try to look it on another machine.) That's a very nice looking
website. cheers paul 

-----Original Message-----
From: DWUTKA at marlow.com [mailto:DWUTKA at marlow.com]
Sent: Tuesday, August 03, 2004 5:18 PM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] Programmatically Hide the DATABASE Window


Okay Paul, my website is finally back up.  Goto http://www.wolfwares.com and
download the MiniCalendar database.  It is in the Microsoft Access section,
(MiniCalendar3.zip).  It's an Access 97 database.  Notice that when it
starts, the form is on the desktop.  No sign of Access at all.  To 'show'
Access, hit Ctrl-A (same to hide it again).

Drew

 -----Original Message-----
From: 	accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]  On Behalf Of Paul Rodgers
Sent:	Tuesday, August 03, 2004 10:51 AM
To:	'Access Developers discussion and problem solving'
Subject:	RE: [AccessD] Programmatically Hide the DATABASE Window

Hi Charlotte

I'm using your code and it works well, thank you.

But, yes, I am trying to achieve something else, as you say. I want to give
the user a form and nothing else - but I need to be able to go in and out
myself to make adjustments et al. Is this something you could advise on
please?

Cheers paul


-----Original Message-----
From: Charlotte Foust [mailto:cfoust at infostatsystems.com]
Sent: Tuesday, August 03, 2004 4:36 PM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] Programmatically Hide the DATABASE Window


I don't quite understand what you're trying to do.  The database window
is only visible from within the application, so you put the code into
public functions and create an autokey to trigger it, if that's what
you're trying to accomplish.  If you're talking about hiding something
else, like the main window, that's an entirely different thing. 

Charlotte Foust


-----Original Message-----
From: Paul Rodgers [mailto:Paul.Rogers at SummitMedia.co.uk] 
Sent: Monday, August 02, 2004 11:56 PM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] Programmatically Hide the DATABASE Window


Darren

That is good ... but how can I hide Window/Unhide? 

I suppose I could put Charlotte's public function in another db and
trigger from there?

Sorry, so many questions to begin (or end) your day. Hope the winter's
ok there. 

Cheers paul 

-----Original Message-----
From: Darren DICK [mailto:d.dick at uws.edu.au]
Sent: Monday, August 02, 2004 11:12 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Programmatically Hide the DATABASE Window


Hi Paul
In Charlotte's code below replace 

DoCmd.RunCommand acCmdWindowhide
with
DoCmd.RunCommand acCmdWindowUnhide

----- Original Message ----- 
From: "Paul Rodgers" <Paul.Rogers at summitmedia.co.uk>
To: "'Access Developers discussion and problem solving'"
<accessd at databaseadvisors.com>
Sent: Monday, August 02, 2004 5:51 PM
Subject: RE: [AccessD] Programmatically Hide the DATABASE Window


> Interesting, Charlotte, but what happens when you want to Unhide so 
> you
can
> work on the  database?
> 
> I always use the StartUp checkboxes myself - but then I am usually 
> always around when the databases are being used.
> 
> I can see it there are many times when it would be useful to have only

> the required form showing, and Unhide unavailable too. So I will await

> keenly for an answer. All the best
> 
> paul
> 
> -----Original Message-----
> From: Charlotte Foust [mailto:cfoust at infostatsystems.com]
> Sent: Friday, July 30, 2004 7:09 PM
> To: Access Developers discussion and problem solving
> Subject: RE: [AccessD] Programmatically Hide the DATABASE Window
> 
> 
> Try this:
> 
> Public Function HideDBWindow()
>   On Error GoTo HideDBWindow_err
>   ' select a tab in the Database Window
>   DoCmd.SelectObject acTable, , True
>   ' Hide the database window
>   DoCmd.RunCommand acCmdWindowHide
> HideDBWindow_exit:
>   Exit Function
> HideDBWindow_err:
>   MsgBox Err.Description & " (#" & Err & ")"
>   Resume HideDBWindow_exit
> End Function
> 
> Charlotte Foust
> 
> 
> -----Original Message-----
> From: Greg Smith [mailto:GregSmith at starband.net]
> Sent: Friday, July 30, 2004 9:46 AM
> To: accessd at databaseadvisors.com
> Subject: [AccessD] Programmatically Hide the DATABASE Window
> 
> 
> Hello everyone, again.  It's FRIDAY!
> 
> Pretty much got the menu bar working (one issue with the "menu Bar"'s 
> control box not showing up after being disabled then enabled...but 
> that's not the point here).
> 
> I want to hide the main database window (the one with the queries, 
> tables, forms, etc., to be exact) on startup, but not using the 
> Startup's checkbox, but through vb.  The DBA Archives dance around the

> issue, but I can't find where it's addressed.  Is there a way to do 
> this through code or am I stuck with using the checkbox in the Startup

> menu? I'm using Access97 in this app.
> 
> Thanks!
> 
> Greg Smith
> gregsmith at starband.net
> 
> 
> --
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> -- 
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 
> --
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
-- 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list