dch3 said:
Two of the format conditions referenced columns in a combo box in the
detail
as in
[Forms]![frmManifest]![subfrmManifestDetail].form!cboPartDescription.Column(4)
= True.
I ended up adding the fields to the underlying recordsource and then
pointing the conditions to the new fields as in
[Forms]![frmManifest]![subfrmManifestDetail].form!ynCaptureDimensions =
true.
This seems to have fixed the problem.
I'm assuming that although the column information is available, that its
stored in such a way (and that the Format Conditions code operates) in
such a
way that the Format Condition does not immediately have access to the
values.
Lesson - Don't reference a listbox or comboBox .Column in a format
condition's expression.
Interesting, and a useful warning. I can think of one possible explanation,
which may or may not be the key. The Column property of a combo or list box
is a text property, so its value is always either Null or a string. I
notice that your original expression (if you posted it accurately) doesn't
have quotes around "True", and I'm not sure whether that literal would be
correctly compared to the text value in the combo column, which may be "Yes"
or "-1", rather than "True". If these expressions were working, but only
after refresh, then I'd have to conclude that the expression is being
evaluated successfully, but maybe there's some sort of delay caused by type
difference.
If you check the actual values in the combo's Column property, and form your
condition expression to use those string values, does the problem go away?
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)