加好友 发短信
等级:狐仙
帖子:9875
积分:57584
威望:0
精华:15
注册:2008/9/1 9:45:00
|
Post By:2011/5/5 19:16:00 [只看该作者]
If e.DataRow("数量") < 1000 Andalso e.DataRow("折扣") > 0.15 Then '判断是否不符合验证要求 MessageBox.Show("数量低于1000的订单,折扣不能超过0.15","存盘失败",MessageBoxButtons.OK,MessageBoxIcon.Exclamation) '提示用户 Dim Index As Integer Index = Tables("订单").FindRow(e.DataRow) '找出此行在销售数据Table中的位置 If Index > -1 Then '如果找到此行 Tables("订单").Position = Index '将焦点定位到此行 End If Maintable = Tables("订单") '选择销售数据表作为主表。 e.Cancel = True '取消存盘 End If
|
|