L
Louis
Private Sub Command24_Click()
On Error GoTo Err_Command24_Click
MsgBox "You are about to make changes to tables. Are you sure you want to
continue?" _
, vbYesNoCancel, "UPDATE TABLES"
Select Case vbYesNoCancel
Case vbNo
Exit Sub
Case vnCancel
Exit Sub
Case vbYes
DoCmd.OpenQuery "q M_SD MEMOS ARCHIVE", acViewNormal
DoCmd.OpenQuery "q M_ALLOCATE INVENTORY S&D"
DoCmd.OpenQuery "q DELETE A_SHIP & DEBIT STAGE 2B", acViewNormal
End Select
Exit Sub
Exit_Command24_Click:
Exit Sub
Err_Command24_Click:
MsgBox Err.Description
Resume Exit_Command24_Click
End Sub
' I want the queries to run if "Yes" is selected. I can get the queries to
run if Yes, No, or Cancel is selected. I just want them to run with Yes and
exit if else.
On Error GoTo Err_Command24_Click
MsgBox "You are about to make changes to tables. Are you sure you want to
continue?" _
, vbYesNoCancel, "UPDATE TABLES"
Select Case vbYesNoCancel
Case vbNo
Exit Sub
Case vnCancel
Exit Sub
Case vbYes
DoCmd.OpenQuery "q M_SD MEMOS ARCHIVE", acViewNormal
DoCmd.OpenQuery "q M_ALLOCATE INVENTORY S&D"
DoCmd.OpenQuery "q DELETE A_SHIP & DEBIT STAGE 2B", acViewNormal
End Select
Exit Sub
Exit_Command24_Click:
Exit Sub
Err_Command24_Click:
MsgBox Err.Description
Resume Exit_Command24_Click
End Sub
' I want the queries to run if "Yes" is selected. I can get the queries to
run if Yes, No, or Cancel is selected. I just want them to run with Yes and
exit if else.