469,167 Members | 1,976 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,167 developers. It's quick & easy.

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

37
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!
Aug 10 '10 #1

✓ answered by gershwyn

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.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Current()
  2.   If myCheck Then
  3.     MsgBox "Do Not Use"
  4.   End If
  5. End Sub
You'll need to change myCheck to whatever the bound checkbox on your form is actually called, of course.

2 1678
gershwyn
122 100+
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.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Current()
  2.   If myCheck Then
  3.     MsgBox "Do Not Use"
  4.   End If
  5. End Sub
You'll need to change myCheck to whatever the bound checkbox on your form is actually called, of course.
Aug 16 '10 #2
yappy77
37
Thank you!
Aug 18 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Shravan | last post: by
3 posts views Thread by Paul | last post: by
4 posts views Thread by Wayne Wengert | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Mortomer39 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.