Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Adding a Dialogue/Warning Box in Accees using VB

I'd like like to add a Dialogue/Warning Box in Accees using VB in the form clients, when they have clicked on a tick box and when they are using the find and replace 'pre-set' binoculars. I'd like the dialogue box to ask them are they sure they want to place a tick in the tick box or remove one and similar for the binoculars find and replace. Thnaks.

Comments

  • dokken2dokken2 Member Posts: 532
    try this-

    [code]
    Option Compare Database

    Private Sub tick_BeforeUpdate(Cancel As Integer)
    If MsgBox("Are you sure?", vbYesNo) = vbYes Then
    Cancel = False
    Else
    Cancel = True
    End If

    End Sub


    Private Sub Command3_Click()
    On Error GoTo Err_Command3_Click


    If MsgBox("are you sure", vbYesNo) = vbYes Then
    Screen.PreviousControl.SetFocus
    DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
    End If

    Exit_Command3_Click:
    Exit Sub

    Err_Command3_Click:
    MsgBox Err.Description
    Resume Exit_Command3_Click

    End Sub
    [/code]
Sign In or Register to comment.