Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共28 条记录, 每页显示 10 条, 页签: [1] [2][3]
[浏览完整版]

标题:求助,谁来帮我看看这段错误提示是什么意思?

1楼
kevin11 发表于:2011/9/27 18:20:00

图片点击可在新窗口打开查看此主题相关图片如下:qq截图20110927181623.png
图片点击可在新窗口打开查看
如题,感谢!
2楼
mr725 发表于:2011/9/27 18:46:00

可能是没有满足条件的结果造成的···

3楼
kevin11 发表于:2011/9/27 19:13:00
Select Case e.DataCol.name Case "已审批金额" Dim pr As DataRow = e.DataRow.GetParentRow("合同信息汇总表") Dim dr As DataRow = e.DataRow.GetParentRow("营销类合同") If pr("已审批金额") > pr("合同金额") OrElse dr("已审批金额") > dr("合同金额") e.DataRow("已审批金额") = e.OldValue messagebox.show("请注意,累计审批金额已超过合同金额!") End If End Select If e.DataCol.Name = "结账" Then If e.NewValue = True Then e.DataRow.Locked = True End If End If 麻烦帮我看下这段代码可能在哪里出了问题?谢谢了,另外请问为什么我的帖子不能按我拍好的版显示??
4楼
程兴刚 发表于:2011/9/27 19:14:00
贴出您的代码!
5楼
kevin11 发表于:2011/9/27 19:17:00
以下是引用程兴刚在2011-9-27 19:14:00的发言:
贴出您的代码!

Select Case e.DataCol.name Case "已审批金额" Dim pr As DataRow = e.DataRow.GetParentRow("合同信息汇总表") Dim dr As DataRow = e.DataRow.GetParentRow("营销类合同") If pr("已审批金额") > pr("合同金额") OrElse dr("已审批金额") > dr("合同金额") e.DataRow("已审批金额") = e.OldValue messagebox.show("请注意,累计审批金额已超过合同金额!") End If End Select If e.DataCol.Name = "结账" Then If e.NewValue = True Then e.DataRow.Locked = True End If End If
6楼
程兴刚 发表于:2011/9/27 19:28:00
Select Case e.DataCol.name
    Case "已审批金额"
        Dim pr As DataRow = e.DataRow.GetParentRow("合同信息汇总表")
        Dim dr As DataRow = e.DataRow.GetParentRow("营销类合同")
        If pr IsNot Nothing And dr IsNot Nothing
            If pr("已审批金额") > pr("合同金额") OrElse dr("已审批金额") > dr("合同金额")
                e.DataRow("已审批金额") = e.OldValue
                messagebox.show("请注意,累计审批金额已超过合同金额!")
            End If
        End If
    Case  "结账"
        If e.NewValue = True Then
            e.DataRow.Locked = True
        End If
End Select
7楼
mr725 发表于:2011/9/27 19:31:00
你要确定pr和dr是否存在?
[此贴子已经被作者于2011-9-27 19:35:10编辑过]
8楼
程兴刚 发表于:2011/9/27 19:40:00
怀疑他是直接在子表操作,而不是通过关联表增加子表的行,这样的话,有可能关联的父表记录根本不存在,导致出错!
9楼
程兴刚 发表于:2011/9/27 19:42:00
我在避免这方面出错的方法,禁止直接选择子表为主表,也就是判断当前主表为子表时,禁止编辑、修改等操作
10楼
kevin11 发表于:2011/9/27 20:05:00
我是这样做的,请帮我看看是什么问题,谢谢!
 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:管理项目.table

[此贴子已经被作者于2011-9-27 20:18:24编辑过]
共28 条记录, 每页显示 10 条, 页签: [1] [2][3]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .03125 s, 3 queries.