Public Function TNUL2(ByVal vRaw As Variant) As String TNUL2 = IIf(IsNull(vRaw) = True, "", vRaw) End FunctionPublic Function TNUL(ByVal vRaw As Variant) As String TNUL = vRaw & "" End FunctionText5.Text =tnul(...)
错误不是由记录造成的, text文本框不能填入空字符串,所以不妨写一个错误陷井 on error goto L1 你的程序...... L1; if err.number=94 then resume next
if isnull(Trim(Adodc1.Recordset("操作工号"))) then DataCombo1.Text ="" else DataCombo1.Text = Trim(Adodc1.Recordset("操作工号")) end if
if isnull(Adodc1.Recordset("操作工号")) then DataCombo1.Text ="" else DataCombo1.Text = Trim(Adodc1.Recordset("操作工号")) end if
错误不是由记录造成的, text文本框不能填入空字符串,所以不妨写一个错误陷井 on error goto L1 你的程序...... L1; if err.number=94 then resume next 这样,每当遇到空记录时,程序执行L1:中的语句, resume next 表示,执行中断后的代码
TNUL2 = IIf(IsNull(vRaw) = True, "", vRaw)
End FunctionPublic Function TNUL(ByVal vRaw As Variant) As String
TNUL = vRaw & ""
End FunctionText5.Text =tnul(...)
text文本框不能填入空字符串,所以不妨写一个错误陷井
on error goto L1
你的程序......
L1;
if err.number=94 then resume next
DataCombo1.Text =""
else
DataCombo1.Text = Trim(Adodc1.Recordset("操作工号"))
end if
DataCombo1.Text =""
else
DataCombo1.Text = Trim(Adodc1.Recordset("操作工号"))
end if
text文本框不能填入空字符串,所以不妨写一个错误陷井
on error goto L1
你的程序......
L1;
if err.number=94 then resume next
这样,每当遇到空记录时,程序执行L1:中的语句,
resume next
表示,执行中断后的代码