|
当我选择记录后,再点删除无任何反应, Me.ActiveControl.Name这里看不懂,请高手看一下,谢谢
Case "delete"
If GetPower("delPrice") = False Then Exit Sub
Select Case Me.ActiveControl.Name
Case "lstPrice"
If lstPrice.ListCount < 2 Or IsNull(lstPrice) Then
MsgBox "请选中您要删除的报价单......", vbInformation
Exit Sub
Else
If MsgBox("您确定要删除报价单 ==> " & lstPrice & " 吗?" & vbCrLf & "注意:此操作不可恢复", vbYesNo + vbExclamation) = vbYes Then
CurrentDb.Execute "delete * from tblPriceM where tblPriceM.PriceID='" & lstPrice & "';"
lstPrice.RowSource = lstPrice.RowSource
lstPrice.Requery
lstPro.RowSource = "SELECT QPrice.* FROM QPrice WHERE 0;"
End If
End If
Case "lstPro"
MsgBox "报价单数据来源于BOM,清单项目禁止删除," & vbCrLf _
& "如需变更请修改相应BOM然后重新生成报价单......", vbExclamation
End Select |
|