Hiding Access

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is the any way that I can hide the access window to just leave up the form,
but on a certain key stroke for it to reappear.

I am a basic user so if you answer please please keep it simple


Thank you
 
Create a new module. If you do not see the two words "Option Explicit" as the
second line of code in this new module, then follow the instructions shown in
this "Gem Tip" to configure your VBA editor:

Always Use Option Explicit
http://www.access.qbuilt.com/html/gem_tips.html#VBEOptions

While you are there, I suggest deselecting the options to Compile on Demand.

Copy the code shown in the page, and paste it into your new module. Save the
module, giving it a name *different* from the name of the function that you
just pasted. For example, you might name it: basManipulateAccessWindow

Click on Debug > Compile {ProjectName}. Hopefully, your code will compile
without any errors. You'll know right away if you get a compile error. If the
option appears to be greyed out the second time you try it, then this is a
good sign--it means that your code compiled without an error.

To test it, try opening a switchboard type form first, so that you'll have a
form open. Then press the <Ctrl> <G> at the same time, to open the Immediate
Window. Copy the following command shown in this procedure, and paste it into
the Immediate Window:

?fSetAccessWindow(SW_HIDE)

Then hit the <Enter> key and see what happens.

If you like the effect after you've had a chance to experiment with it, then
you could add a call to this function in an Autoexec macro.


Tom Wickerath
Microsoft Access MVP
https://mvp.support.microsoft.com/profile/Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 
As a follow-up to this discussion, I found that when I actually tried my
suggestion that it did not work. Sorry about that. As you might guess, I have
never attempted to hide the Access application window in any of my apps. It
turns out that in later versions of Access (after this code was posted
several years earlier), that one must apparently set both the Modal and Popup
properties to Yes for all forms, and then use code like this:

Private Sub Form_Open(Cancel As Integer)
Me.Visible = True
DoEvents
fSetAccessWindow SW_HIDE
End Sub

This seems like too much of a PITA for me to want to deal with!

I'd like to refer you to an excellent discussion on this topic in the Utter
Access discussion group. Pay particular attention to the posts made by
"AccessJunkie" (Jeff Conrad) and "mishei" (John Mishefske). Jeff makes some
excellent points in his second reply as to why you may want to reconsider
implementing this functionality.


Tom Wickerath
Microsoft Access MVP
https://mvp.support.microsoft.com/profile/Tom
http://www.access.qbuilt.com/html/expert_contributors.html
 
Tom

I used your suggestion to hide the application window using :-
Manipulate Access Window
http://www.mvps.org/access/api/api0019.htm

Private Sub Form_Open(Cancel As Integer)
Me.Visible = True
DoEvents
fSetAccessWindow SW_HIDE
End Sub

It works just great, however, now I cant get it back when I want to carry
out additions or modifications to the database, can you tell me how to do
this please.

Thanks

Joe
 
Back
Top