Foxtable(狐表)用户栏目专家坐堂 → [求助]帮忙改下代码!


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

主题:[求助]帮忙改下代码!

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


加好友 发短信
等级:童狐 帖子:242 积分:2235 威望:0 精华:0 注册:2011/8/16 22:33:00
[求助]帮忙改下代码!  发帖心情 Post By:2013/1/25 3:39:00 [只看该作者]

If e.Form.Controls("TextBox5").Value IsNot Nothing Then
    If e.Form.Controls("TextBox3").Value IsNot Nothing Then
        Dim Filter As String
        With e.Form.Controls("TextBox3")
            If .Value IsNot Nothing Then
                If Filter >"" Then
                    Filter = Filter & " And "
                End If 
                Filter = Filter & "生产条码 = '" & .Value & "'"
            End If
        End With
        If Filter > "" Then
            Tables("生产明细").Filter = Filter
        End If
        If Tables("生产明细").Current IsNot Nothing Then
        Tables("生产明细").Current.DataRow.Load()
            If Tables("生产明细").Current("是否交货") = "NO" Then 
                e.Form.Controls("Label777").text = "此条码卡生产未交货!"
                e.Form.Controls("TextBox3").Value  = Nothing
                e.Form.Controls("TextBox3").Select()
            Else
                e.Form.Controls("Label777").text = "请扫描生产条码"
                e.Form.Controls("TextBox3").Select()
                e.Form.Controls("TextBox3").Value  = Nothing
                Forms("检验窗口").Open()
            End If
        Else

            Dim id As Integer = DataTables("生产明细").Compute("Max(_Identify)")
            Dim Filter As String = "[_Identify] > " & id
            DataTables("生产明细").AppendLoad(Filter, False)

            e.Form.Controls("Label777").text = "查无此条码卡,请尝试再刷一次!"
            e.Form.Controls("TextBox3").Value  = Nothing
            e.Form.Controls("TextBox3").Select()
        End If
    Else
        e.Form.Controls("Label777").text = "请扫描生产条码"
        e.Form.Controls("TextBox3").Select()
    End If
Else
    e.Form.Controls("Label777").text = "没有员工资料"
    e.Form.Controls("TextBox1").Select()
End If

只要加了黄色这句就不行,好像是上面有Filter,里面也有Filter的问题!帮我改下,谢了!!!!!

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


加好友 发短信
等级:等待验证 帖子:3855 积分:20692 威望:0 精华:5 注册:2012/6/21 14:03:00
  发帖心情 Post By:2013/1/25 8:17:00 [只看该作者]

用户已被锁定

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


加好友 发短信
等级:幼狐 帖子:198 积分:1655 威望:0 精华:0 注册:2013/1/11 15:10:00
  发帖心情 Post By:2013/1/25 8:56:00 [只看该作者]

不用改也可以吧

Dim id As Integer = DataTables("生产明细").Compute("Max(_Identify)")
Filter = "[_Identify] > " & id
DataTables("生产明细").AppendLoad(Filter, False)
定义去掉试试


 


 回到顶部