reloading a form

  • Thread starter Thread starter Gonzosez
  • Start date Start date
G

Gonzosez

I have a form that connects to a database.
When the form loads if it can not connect to the database (connection info
stored in registry) it opens a 2nd form that
asks for set up information. Once the setup is complete I need to re run the
first form to collect the
new values from the registry.
How can I reload the first form?
I have tried refresh but this does not seem to work.
Thanks
 
I'm guessing that the code that connects to the database is called on
the Form1.Load event. If so just call the procedure that connects to
the database when you're done with form2.

Also, you may look into starting from a module's Sub Main. Then, check
to see if you can connect to the database. If so, continue to load
form1, or if you can't connect then load form2. You could then loop
recursively through this (in case the user enters invalid connection
info) until either a connection is established or the user presses
"cancel" on form2.

Does that help?

Thanks,

Seth Rowe
 
Back
Top