Open and Close Form programatically

  • Thread starter Thread starter tracey
  • Start date Start date
T

tracey

I created a db and am now packaging it. I created a
frontend which will be installed on the local machine and
a backend that will be installed on the server. I coded a
startup form that will check to see if the links to the
tables are refreshed on the form_open event. If the tables
are refreshed then I need the startup form to close, which
will open a login form. I keep getting an error 2585,
this action can't be carried out while processing a form
or a report event. How do I run code on the open or load
event and then close the form when the code is done
running? Is there a better way to do this. As alway you
guys rock! Thanks
Trace
 
I am guessing that you may be using
DoCmd.Close acForm, Me.Name
in the form's Open eventhandler. If so, then replacing it
with
Cancel = True
should stop the error.

If I am wrong, could you post the code to this thread. It
makes life a lot easier when dealing with error messages.

Hope This Helps
Gerald Stanley MCSD
 
Back
Top