Hello Everyone,
When I run this code it gives me a 'type mismatch'. Not too sure what that means. Can any give some pointers
Private Sub lblUpdate_Click()
On Error GoTo Err_lblUpdate_Click
Dim stDocName As String
MsgBox "Are you sure that you need to use the UPDATE option", vbYesNo, "REPORT UOPDATE!"
If MsgBox("Are you sure that you need to use the UPDATE option", vbYesNo, "REPORT UOPDATE!" = vbNo) Then
Exit Sub
Else
stDocName = "UpdateSalesData"
DoCmd.RunMacro stDocName
End If
stDocName = "UpdateSalesData"
DoCmd.RunMacro stDocName
Exit_lblUpdate_Click:
Exit Sub
Err_lblUpdate_Click:
MsgBox Err.Description
Resume Exit_lblUpdate_Click
End Sub
Hayton McGregor
When I run this code it gives me a 'type mismatch'. Not too sure what that means. Can any give some pointers
Private Sub lblUpdate_Click()
On Error GoTo Err_lblUpdate_Click
Dim stDocName As String
MsgBox "Are you sure that you need to use the UPDATE option", vbYesNo, "REPORT UOPDATE!"
If MsgBox("Are you sure that you need to use the UPDATE option", vbYesNo, "REPORT UOPDATE!" = vbNo) Then
Exit Sub
Else
stDocName = "UpdateSalesData"
DoCmd.RunMacro stDocName
End If
stDocName = "UpdateSalesData"
DoCmd.RunMacro stDocName
Exit_lblUpdate_Click:
Exit Sub
Err_lblUpdate_Click:
MsgBox Err.Description
Resume Exit_lblUpdate_Click
End Sub
Hayton McGregor