如何识别VBA中的计算字段 [英] How to identify calculated fields in VBA
本文介绍了如何识别VBA中的计算字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
VBA代码在记录集中使用字段列表(对于myrecordset.fields中的每个字段...),该表基于从表中选择所有字段但需要对常规字符执行不同处理的表对于电子计算字段。
是否有一个字段属性可识别计算字段?
myrecordset.fields中的每个字段
如果是fld。??? 然后
'计算字段代码
其他
'非计算字段代码
结束如果
'
解决方案
< blockquote>我假设您需要检查字段是否有表达式。
The VBA code uses the field list (for each fld in myrecordset.fields...) in a recordset based on a table that selected all fields from the table but needs to do different processing for the regular and for e thcalculated fields.
Is there a field property that identifies calculated fields?
for each fld in myrecordset.fields
if fld.??? then
'calculated fields code
else
'non calculated fields code
end if
'
解决方案
I'm assuming you'd need to check to see if the field has an Expression or not.
这篇关于如何识别VBA中的计算字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文