加上条件,即可
For Each dr As DataRow In DataTables("电池检验记录").Select("空载电压测试值 is not null and 材料代号 = '" & Tables("电池").Current("材料代号") & "'")