Foxtable(狐表)用户栏目专家坐堂 → 请老师纠正


  共有2079人关注过本帖树形打印复制链接

主题:请老师纠正

帅哥哟,离线,有人找我吗?
xusuyang
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:幼狐 帖子:100 积分:1120 威望:0 精华:0 注册:2017/5/3 18:40:00
请老师纠正  发帖心情 Post By:2017/5/10 13:58:00 [只看该作者]

 老师!请帮查找一下

If e.DataCol.Name = "产品名称" Then

    If e.DataRow.IsNull("产品名称") Then

        e.DataRow("产品编码") = Nothing

    Else

        e.DataRow("产品编码") = GetPy(e.DataRow("产品名称"), 1)

    End If

End If

If e.DataCol.Name = "订货日期" Then

    If e.DataRow.IsNull("订货日期") Then

        e.DataRow("产品编码") = Nothing

    Else

        Dim bh As String = e.DataRow("产品编码") & Format(cdate(e.DataRow("订货日期")),"yyyyMMdd")

 

   

        If e.DataRow("订货编码").StartsWith(bh) = False

            Dim max As String

            Dim idx As Integer

    If e.DataRow.IsNull("产品编码") Then

max = e.DataTable.Compute("Max(订货编码)","产品编码 is null And 订货日期= #" & e.DataRow("订货日期") & "# And [_Identify] <> " & e.DataRow("_Identify"))

Else

会出现;编译错误“If”必须以匹配的“End If”结束。错误代码:If e.Data Col.Name=“订货日期”the

 


 回到顶部
帅哥哟,离线,有人找我吗?
zoyong
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:三尾狐 帖子:653 积分:7747 威望:0 精华:0 注册:2015/8/24 9:02:00
  发帖心情 Post By:2017/5/10 14:08:00 [只看该作者]

End If

完整代码发上来
[此贴子已经被作者于2017/5/10 14:09:42编辑过]

 回到顶部
帅哥哟,离线,有人找我吗?
xusuyang
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:幼狐 帖子:100 积分:1120 威望:0 精华:0 注册:2017/5/3 18:40:00
  发帖心情 Post By:2017/5/10 14:16:00 [只看该作者]

 

If e.DataCol.Name = "产品名称" Then

    If e.DataRow.IsNull("产品名称") Then

        e.DataRow("产品编码") = Nothing

    Else

        e.DataRow("产品编码") = GetPy(e.DataRow("产品名称"), 1)

    End If

End If

If e.DataCol.Name = "订货日期" Then

    If e.DataRow.IsNull("订货日期") Then

        e.DataRow("产品编码") = Nothing

    Else

        Dim bh As String = e.DataRow("产品编码") & Format(cdate(e.DataRow("订货日期")),"yyyyMMdd")

 

   

        If e.DataRow("订货编码").StartsWith(bh) = False

            Dim max As String

            Dim idx As Integer

    If e.DataRow.IsNull("产品编码") Then

max = e.DataTable.Compute("Max(订货编码)","产品编码 is null And 订货日期= #" & e.DataRow("订货日期") & "# And [_Identify] <> " & e.DataRow("_Identify"))

Else


 回到顶部
帅哥哟,离线,有人找我吗?
zoyong
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:三尾狐 帖子:653 积分:7747 威望:0 精华:0 注册:2015/8/24 9:02:00
  发帖心情 Post By:2017/5/10 14:21:00 [只看该作者]


  Dim max As String

  Dim idx As Integer

If e.DataCol.Name = "产品名称" Then

    If e.DataRow.IsNull("产品名称") Then

        e.DataRow("产品编码") = Nothing

    Else

        e.DataRow("产品编码") = GetPy(e.DataRow("产品名称"), 1)

    End If

End If

If e.DataCol.Name = "订货日期" Then

    If e.DataRow.IsNull("订货日期") Then

        e.DataRow("产品编码") = Nothing

    Else

        Dim bh As String = e.DataRow("产品编码") & Format(cdate(e.DataRow("订货日期")),"yyyyMMdd")

  If e.DataRow("订货编码").StartsWith(bh) = False          

    If e.DataRow.IsNull("产品编码") Then

max = e.DataTable.Compute("Max(订货编码)","产品编码 is null And 订货日期= #" & e.DataRow("订货日期") & "# And [_Identify] <> " & e.DataRow("_Identify"))

Else

End If

End If

End If

End If




 回到顶部
帅哥哟,离线,有人找我吗?
xusuyang
  5楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:幼狐 帖子:100 积分:1120 威望:0 精华:0 注册:2017/5/3 18:40:00
  发帖心情 Post By:2017/5/10 14:42:00 [只看该作者]

If e.DataCol.Name = "产品名称" Then
    If e.DataRow.IsNull("产品名称") Then
        e.DataRow("产品编码") = Nothing
    Else
        e.DataRow("产品编码") = GetPy(e.DataRow("产品名称"), 1)
    End If
End If
If e.DataCol.Name = "订货日期" Then
    If e.DataRow.IsNull("订货日期") Then
    End If
    e.DataRow("产品编码") = Nothing
   
    Dim bh As String = e.DataRow("产品编码") & Format(cdate(e.DataRow("订货日期")),"yyyyMMdd")
   
   
    If e.DataRow("订货编码").StartsWith(bh) = False
        Dim max As String
        Dim idx As Integer
        If e.DataRow.IsNull("产品编码") Then
            max = e.DataTable.Compute("Max(订货编码)","产品编码 is null And 订货日期= #" & e.DataRow("订货日期") & "# And [_Identify] <> " & e.DataRow("_Identify"))
        Else
        End If
    End If
End If

为啥订货编码及产品编码均不显示


 回到顶部
帅哥哟,离线,有人找我吗?
有点蓝
  6楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:106242 积分:540333 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2017/5/10 15:08:00 [只看该作者]

请不要重复提问题:http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&Id=100374

 回到顶部