View Single Post
  #6  
Old November 21st, 2008, 05:16 AM posted to microsoft.public.access
Dirk Goldgar
external usenet poster
 
Posts: 2,529
Default Hide Access Application window?

"NES" wrote in message
...
Dirk, thank you for that information and link. I've copied it for safe
keeping. I'm not sure exactly where this code should be placed I'm
assuming
that selecting the On Open option from the form properties will allow me
to
open the proper window.

If that is so, I'm going to give this a try. Thanks again.



The code from the web page should go into a new standard module, which you
would create by going to the Modules tab of the database window (if you're
using Access 2003 or earlier) and clicking the "New" button. If you're
using Access 2007, I don't remember exactly how you do it, but I think you
go to the Create tab of the ribbon, and drop down the Macro button to choose
Module -- or something like that. Once you're in the module, paste in the
code from the web page, and save the module.

The form's Open event is where you put the code to call that function. If
you set the form's On Open property to "[Event Procedure]", then click the
builder button (caption "...") at the end of the property line, you'll find
yourself in the VBA editor, positioned inside the Form_Open event procedure,
ready to add the code. It will look like this:

Private Sub Form_Open(Cancel As Integer)


End Sub

You'll add lines to make it look like this:

Private Sub Form_Open(Cancel As Integer)

Me.Visible = True
DoEvents
fSetAccessWindow SW_HIDE

End Sub

That's all the coding you need to do. The only other thing you need to do
is make sure your form's PopUp and Modal properties are both set to Yes.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)