Opening a form only at startup

S

Shane

Is there a way to open a form at startup and not display the access window
around it.

I have a popup form that is set to open at startup but I want just the form
to be displayed on my desk top not the gray access window maximized behind it.

Thanks in advance
 
S

Shane

Allen

when I call this from my forms open event the form does not open. I opens
acces to a blank grey screen.

Private Sub Form_Open(Cancel As Integer)
fSetAccessWindow (SW_HIDE)
End Sub

if I put a command button on the form and call it from the OnClick event it
works fine.

What am I doing wrong.

Additional Info:
Access 2002
Form set to popup
Form was set to modal because it was giving me an 2475 error that the form
was not the active window.
Tried opening the form from startup and a autoexec macro. neither works!

Thanks for the info.

Shane
 
J

Jeff Conrad

Here are some instructions I have posted in the past:
1. Create a back-up copy of your database file. Don't skip t­his step!!
2. Go to this web site:

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

Copy all that code to a new standard module.
Module, not form module!

3. Compile the code, save the module and name it modHideAcce­ssWindow.
4. Open your main form (the one that you want the users to s­ee) and go to Design View.
5. Set these Form's Properties:

Auto Center- Yes
Pop-Up - Yes
Modal - Yes

6. Open the code behind the form and copy this code into the­ Form's Open event:

Private Sub Form_Open(Cancel As Integer)

Me.Visible = True
fSetAccessWindow (SW_HIDE)

End Sub

7. You MUST put an exit command button on this form that clo­ses all of Access.
Something with a line like:

DoCmd.Quit

...in the button's Click event.

8. Compile the code, close and save the form.
9. Close the database and then re-open. It *should* now comp­letely hide the Access window and only
show the data entry form.
Let me know if you have problems.
--
Jeff Conrad
Access Junkie - MVP
http://home.bendbroadband.com/conradsystems/accessjunkie.html
http://www.access.qbuilt.com/html/articles.html

in message:
 

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