Me.Close

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 4211Jimbo
    New Member
    • Oct 2006
    • 2

    Me.Close

    I am calling sub procedures to load datatables in the form load event. If the file is not found I catch the exception and since the file was not found I want to close the form. So use the ME.close() as the last line in my exception handler. The problem is that when i step through the code if the file is not found it keeps processing as if the ME.close was not there. Any suggestions?

    Thanks
  • Arkhels
    New Member
    • Oct 2006
    • 4

    #2
    Originally posted by 4211Jimbo
    I am calling sub procedures to load datatables in the form load event. If the file is not found I catch the exception and since the file was not found I want to close the form. So use the ME.close() as the last line in my exception handler. The problem is that when i step through the code if the file is not found it keeps processing as if the ME.close was not there. Any suggestions?

    Thanks

    'Pon el código.

    'Si quieres cerrar la aplicacion pon:
    End

    pero de nuevo pon el codigo, para poder ver el problema

    Comment

    • anaphaxeon
      New Member
      • Oct 2006
      • 30

      #3
      Make a public boolean variable like Public exit As Boolean, exit = false, and replace the Me.Close with exit = true. When the method is finished, check that variable to see if you should exit. Alternatively you could make that subroutine return a boolean value to determine if the form should close. This should take care of that problem.

      Comment

      Working...