Addendum to Dialog box when specific record has check box checked

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

    #1

    Addendum to Dialog box when specific record has check box checked

    I have a check box on my form and in my table that is used to identify when a vendor is no longer used. I want a dialog box to pop up when a user clicks on that particular record.

    I have created a message box using a macro. I am not sure how to tie this macro in with my form. If I am guessing correctly, it would be an IIF statement placed in the form's properties.

    I am not sure how to write the IIF statement and where exactly to place it.

    Thank you for your help!

    Yappy
  • jimatqsi
    Moderator Top Contributor
    • Oct 2006
    • 1293

    #2
    "When a user clicks on that particular record"
    That statement is the key to where you will place the code. The user will not click "on a record" they will click on something that represents the record ... a row of a form? a button? some object or other that we cannot know about but you do.

    In the on-click even of that textbox, button or whatever you will put code something like this:
    Code:
    if me!chkNotUsed = true then 
    msgbox "This vendor is no longer used"
    exit sub
    endif
    That should take care of it. No need for a macro.

    Jim

    Comment

    • yappy77
      New Member
      • Apr 2010
      • 37

      #3
      Thanks, Jim! I think I need to be a little clearer. If the box is already checked and the user clicks on that record, the dialog box should pop up at that time to inform the user not to use that specific vendor.

      If I understand your response, the dialog box would pop up when the user checks the check box which is not the result for which I am looking.

      Any other suggestions?

      Thanks,
      Yappy

      Comment

      Working...