以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  [求助]帮忙改下代码!  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=28309)

--  作者:lsf5138
--  发布时间: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的问题!帮我改下,谢了!!!!!

--  作者:dreamyuan
--  发布时间:2013/1/25 8:56:00
--  

不用改也可以吧

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