Dim Val As String If InputValue(Val, "查找文件","请输入文件号:" & vbCrLf & "(模糊查找)" & vbCrLf & "输入文件号的关键词!") Then
If val = "" Then Tables("文件表").DataTable.LoadFilter = "" Else DataTables("文件表").LoadFilter = "文件号 Like '%" & val.Replace("[", "@[#").Replace("]", "@]#").Replace("@", "[").Replace("#", "]") & "%'" Tables("文件表").DataTable.Load() End If End If