Close & Open form with code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I just converted a macro to code using the convert utility. Of concern are
just two lines in the macro: OpenForm and CloseForm that work fine in the
macro.

When the form opens, OnActivate makes some makes some comparisons and calcs
that are used further down the macro after the form is closed. When I
convert those two lines to VBA, the form won't close-just opens, does its
calcs and stays there.

I changed the form caclcs to OnClose, the form then closes ok but the code
stops as if I insersted and End statement. What am I mssing? Thanks for any
help.
 
You really need to post your code for us to help.
I just converted a macro to code using the convert utility. Of concern are
just two lines in the macro: OpenForm and CloseForm that work fine in the
macro.

When the form opens, OnActivate makes some makes some comparisons and calcs
that are used further down the macro after the form is closed. When I
convert those two lines to VBA, the form won't close-just opens, does its
calcs and stays there.

I changed the form caclcs to OnClose, the form then closes ok but the code
stops as if I insersted and End statement. What am I mssing? Thanks for any
help.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
 
I just converted a macro to code using the convert utility. Of concern are
just two lines in the macro: OpenForm and CloseForm that work fine in the
macro.

When the form opens, OnActivate makes some makes some comparisons and calcs
that are used further down the macro after the form is closed. When I
convert those two lines to VBA, the form won't close-just opens, does its
calcs and stays there.

I changed the form caclcs to OnClose, the form then closes ok but the code
stops as if I insersted and End statement. What am I mssing? Thanks for any
help.

You don't show your code, so it's hard to be sure - but if you open
the form in Dialog mode, your code will stop until the opened form is
closed or made invisible.

John W. Vinson[MVP]
 

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

Similar Threads

trying to close a form 1
Form hopping 1
hiding an open form 3
Error 2455 on close of db 13
Keep form open until loop completes 2
Opening form unexpectedly closes other form 0
Open Form On Close 1
Function call 13

Back
Top