hidden form at startup

  • Thread starter Thread starter Richard
  • Start date Start date
R

Richard

Hi

How do I open a form at startup, achidden. Now I am using the macro to do
it. Can I do it without using the macro?

Thanks in advance
RIchard
 
Hi Allen

Thanks for the reply. That's what I am doing now. I was hoping there is
another way of doing it.

Thanks again
Richard
 
The alternative is to specify a startup form under Tools | Startup, and use
the Load event of that form to run your initialization code.

In a typical split database, we use an unbound startup form, and in its Open
event show your splash screen, check the connections for the data, open the
hidden form, open the switchbboard, and then cancel the Open event so the
original form never does open. What this does is unload the initialization
code from memory when the original form is closed.
 
With the form open in design view:

1. Set the form's On Open property to
[Event Procedure]

2. Click the build button (...) beside this.
Access opens a code window.

3. Between the "Private Sub..." and "End Sub" lines, enter:
Cancel = True
after the other code you want there.

If you are doing this in a macro, use CancelEvent.
 
Thanks Allen. Will try it and see.

Richard


Allen Browne said:
With the form open in design view:

1. Set the form's On Open property to
[Event Procedure]

2. Click the build button (...) beside this.
Access opens a code window.

3. Between the "Private Sub..." and "End Sub" lines, enter:
Cancel = True
after the other code you want there.

If you are doing this in a macro, use CancelEvent.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

SimonDeLikeable said:
Seems like a good idea. How do you cancel the open event?
Diarmuid

and
use its
Open open
the macro
 
Back
Top