大师:
If Tables("颜色尺码").Current("尺码66") > 0 Then
Tables("订单主表.颜色尺码").Cols("尺码66").Visible = True
Else
Tables("订单主表.颜色尺码").Cols("尺码66").Visible = False
End If
If Tables("颜色尺码").Current("尺码73") > 0 Then
Tables("订单主表.颜色尺码").Cols("尺码73").Visible = True
Else
Tables("订单主表.颜色尺码").Cols("尺码73").Visible = False
End If
If Tables("颜色尺码").Current("尺码80") > 0 Then
Tables("订单主表.颜色尺码").Cols("尺码80").Visible = True
Else
Tables("订单主表.颜色尺码").Cols("尺码80").Visible = False
End If
If Tables("颜色尺码").Current("尺码90") > 0 Then
Tables("订单主表.颜色尺码").Cols("尺码90").Visible = True
Else
Tables("订单主表.颜色尺码").Cols("尺码90").Visible = False
End If
If Tables("颜色尺码").Current("尺码100") > 0 Then
Tables("订单主表.颜色尺码").Cols("尺码100").Visible = True
Else
Tables("订单主表.颜色尺码").Cols("尺码100").Visible = False
End If
If Tables("颜色尺码").Current("尺码110") > 0 Then
Tables("订单主表.颜色尺码").Cols("尺码110").Visible = True
Else
Tables("订单主表.颜色尺码").Cols("尺码110").Visible = False
End If
If Tables("颜色尺码").Current("尺码120") > 0 Then
Tables("订单主表.颜色尺码").Cols("尺码120").Visible = True
Else
Tables("订单主表.颜色尺码").Cols("尺码120").Visible = False
End If
If Tables("颜色尺码").Current("尺码130") > 0 Then
Tables("订单主表.颜色尺码").Cols("尺码130").Visible = True
Else
Tables("订单主表.颜色尺码").Cols("尺码130").Visible = False
End If
If Tables("颜色尺码").Current("尺码140") > 0 Then
Tables("订单主表.颜色尺码").Cols("尺码140").Visible = True
Else
Tables("订单主表.颜色尺码").Cols("尺码140").Visible = False
End If
If Tables("颜色尺码").Current("尺码150") > 0 Then
Tables("订单主表.颜色尺码").Cols("尺码150").Visible = True
Else
Tables("订单主表.颜色尺码").Cols("尺码150").Visible = False
End If
If Tables("颜色尺码").Current("尺码160") > 0 Then
Tables("订单主表.颜色尺码").Cols("尺码160").Visible = True
Else
Tables("订单主表.颜色尺码").Cols("尺码160").Visible = False
End If
If Tables("颜色尺码").Current("尺码165") > 0 Then
Tables("订单主表.颜色尺码").Cols("尺码165").Visible = True
Else
Tables("订单主表.颜色尺码").Cols("尺码165").Visible = False
End If
If Tables("颜色尺码").Current("尺码170") > 0 Then
Tables("订单主表.颜色尺码").Cols("尺码170").Visible = True
Else
Tables("订单主表.颜色尺码").Cols("尺码170").Visible = False
End If
If Tables("颜色尺码").Current("尺码175") > 0 Then
Tables("订单主表.颜色尺码").Cols("尺码175").Visible = True
Else
Tables("订单主表.颜色尺码").Cols("尺码175").Visible = False
End If
If Tables("颜色尺码").Current("尺码180") > 0 Then
Tables("订单主表.颜色尺码").Cols("尺码180").Visible = True
Else
Tables("订单主表.颜色尺码").Cols("尺码180").Visible = False
End If
If Tables("颜色尺码").Current("尺码185") > 0 Then
Tables("订单主表.颜色尺码").Cols("尺码185").Visible = True
Else
Tables("订单主表.颜色尺码").Cols("尺码185").Visible = False
End If
我在颜色尺码表的AfterLoad中写这样的代码可以做到想要的效果,但是这样有点复杂,并且在删除查询框中的名称时会报错“未将对象引用设置到对象的实例”