Dim val As String = e.form.Controls("TextBox1").Value If val Is Nothing Then MsgBox("填写编号!",64,"提示") Return End If If val.Length <> 6 Then MsgBox("编号错误!",64,"提示") Return End If If val IsNot Nothing Then DataTables("SFMX").LoadFilter = "BH = '"& val &"'" DataTables("SFMX").Load() End If