Foxtable(狐表)用户栏目专家坐堂 → 谁能看卡这段代码有什么问题吗?~求帮助


  共有10591人关注过本帖平板打印复制链接

主题:谁能看卡这段代码有什么问题吗?~求帮助

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


加好友 发短信
等级:婴狐 帖子:15 积分:156 威望:0 精华:0 注册:2011/6/14 16:51:00
谁能看卡这段代码有什么问题吗?~求帮助  发帖心情 Post By:2011/6/17 12:23:00 [只看该作者]

Dim c1 As WinForm.ComboBox
Dim c2 As WinForm.TextBox


c1 = e.Form.Controls("ComboBox1")
c2 = e.Form.Controls("TextBox1")

Dim s1 As String = c1.Value
Dim s2 As String = c2.Value
Dim r As Integer

If s2 IsNot Nothing Then
    Select Case s1
        Case "物料号"
            r = Tables("库存").FindRow("[物料号] = " & s2, 0, True)
            If r >= 0 Then
                CurrentTable.Position = r
            Else
                MessageBox.Show("  输入的物料号不存在!", "提示", MessageBoxButtons.OK,MessageBoxIcon.Information)
            End If
        Case "物料名称"
            r = Tables("库存").FindRow("[物料名称] = " & s2 , 0, True)
            If r >= 0 Then
                CurrentTable.Position = r
            Else
                MessageBox.Show("  输入的物料名称不存在!", "提示", MessageBoxButtons.OK,MessageBoxIcon.Information)
            End If
    End Select
Else
    MessageBox.Show("    请输出查找内容!", "提示", MessageBoxButtons.OK,MessageBoxIcon.Information)
End If

 

 

一直在             r = Tables("库存").FindRow("[物料名称] = " & s2 , 0, True)

这行出错。。不懂了


 回到顶部