Start up Problems

T

Trever B

I have set my startup prog to run "formA"

FormA runs some VBA procuders on opening.

Then when it has finished proc would like to open formB and close FormA

What would the best way of doing this.

Thanks

I can't get it right.
 
D

Daniel Doyle

I usually use an autoexec macro and delete the startup form from the startup
options as I get to the point where there is too much going on behind the
startup form.
Is this route possible for you?
Your autoexec macro could just call a public function that opens FormA, then
run's your code, close FormA and then opens FormB.
Is FormA just displaying some sort of information? Are you using it solely
to run some startup code?

Dan Doyle.
 
F

fredg

I have set my startup prog to run "formA"

FormA runs some VBA procuders on opening.

Then when it has finished proc would like to open formB and close FormA

What would the best way of doing this.

Thanks

I can't get it right.

Open the next form and close this one at the end of your current code.

Private Sub Form_Open(Cancel As Integer)
' This is the code you are currently using
' This is some more code
DoCmd.OpenForm "FormB"
DoCmd.Close acForm, Me.Name
End Sub
 
Top