Posted By

heislekw on 02/11/11


Tagged

timer activeform


Versions (?)

Make popup form close when user clicks outside of it


 / Published in: Visual Basic
 

  1. ' Change Timer value from default of 0 to something like 200
  2.  
  3. Private Sub Form_Timer()
  4. ' error trap is used to process situations when a form is clicked outside of the popup form
  5. On Error GoTo NotForm:
  6.  
  7. If Me.Name = Screen.ActiveForm.Name Then Exit Sub
  8.  
  9. NotForm:
  10. DoCmd.Close acForm, Me.Name, acSaveNo
  11. End Sub

Report this snippet  

You need to login to post a comment.