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)
这行出错。。不懂了