表的增加行,跳转录入窗口,录入窗口的确定按钮事件:测试结果,只有一个设置为1(红色阴影),一个设置为0(红色阴影)。为什么呢?
Dim dr =Tables("工程款项支付预算部审核表").current
……
ElseIf Tables("工程款项支付预算部审核表").Compute("Count([_Identify])","合同档案编号 = '" & dr("合同档案编号") & "' And 产值年份 = "& dr("产值年份") &" And 产值月份 = "& dr("产值月份") &"")>1 Then
MessageBox.Show("已经存在相同的合同及年月的行!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Dim dr =Tables("合作商基本信息表").current
If e.Form.Controls("公司名称").value Is Nothing
messagebox.show("公司名称不能为空")
ElseIf Tables("合作商基本信息表").Compute("Count([_Identify])","公司名称 = '" & dr("公司名称").trim() & "' And 承办部门= '"& user.group &"'")> 0 Then
MessageBox.Show("已经存在相同合作商名称的行!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)