这个意思?
Dim Txt As String = Forms("窗口2").Controls("TextBox1").ValueDim dr As DataRow = DataTables("表名").Find("列名='" & Txt & "'")If dr IsNot Nothing Then MessageBox.Show("找到")End If