Pop up dialog box on focus when a record has a specific check box checked

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • yappy77
    New Member
    • Apr 2010
    • 37

    #1

    Pop up dialog box on focus when a record has a specific check box checked

    I need to create a dialog box that says Do Not Use if a record on my form has a specific check box checked.

    I am sure there are step by step instructions somewhere but I don't know where to look. I am not good at understanding code so I would need someone to do that for me.

    I am guessing that I would create a form for the dialog box that says Do Not Use with an OK button which upon clicking would close the dialog box. This box would only pop up when the check box for a record on my form has been checked. Then each time that record has focus, the dialog box would pop up.

    I am not sure how to tie the on focus, the dialog box, and the check box together.

    Any help would be much appreciated.

    Thank you!
  • gershwyn
    New Member
    • Feb 2010
    • 122

    #2
    You don't need to create a form for your dialog box - there is a built-in function called MsgBox that can display most standard dialog boxes for you.

    To call the code, I would use the form's OnCurrent event. This will fire when the user navigates to the record.

    Code:
    Private Sub Form_Current()
      If myCheck Then
        MsgBox "Do Not Use"
      End If
    End Sub
    You'll need to change myCheck to whatever the bound checkbox on your form is actually called, of course.

    Comment

    • yappy77
      New Member
      • Apr 2010
      • 37

      #3
      Thank you!

      Comment

      Working...