Calculated Control using a User-Defined Function

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Usually when I want to use a calculated field in the detail section of a
report, I create that field in the underlying query, and then bind that field
to a text box control. I am now attempting a more complex calculated field
(string type) that looks at 14 other fields in the same record and determines
whether their value is "Yes" or "No" (Boolean). If the field value is "Yes",
I concatenate that Field Name to a string variable so that I can return a
complete comma separated list displaying all of the "Yes" field names on the
current record. (Usually only 3 or 4 fields are selected, and this approach
will conserve space on the report.)

The correct list for the first record in the recordset is returned, and is
corectly displayed on the report. However, all subsequent detail lines in
the report also give that same value.

What is wrong with my logic? What am I overlooking? I have been working on
this problem for four days. (too proud to ask for help) Deadline is tomorrow.

Craig A. Darville
 
Craig said:
Usually when I want to use a calculated field in the detail section of a
report, I create that field in the underlying query, and then bind that field
to a text box control. I am now attempting a more complex calculated field
(string type) that looks at 14 other fields in the same record and determines
whether their value is "Yes" or "No" (Boolean). If the field value is "Yes",
I concatenate that Field Name to a string variable so that I can return a
complete comma separated list displaying all of the "Yes" field names on the
current record. (Usually only 3 or 4 fields are selected, and this approach
will conserve space on the report.)

The correct list for the first record in the recordset is returned, and is
corectly displayed on the report. However, all subsequent detail lines in
the report also give that same value.

What is wrong with my logic? What am I overlooking? I have been working on
this problem for four days. (too proud to ask for help) Deadline is tomorrow.


What event are you using and how are you doing this? I
assume you're using code for this, if you are, then please
post a Copy/Paste of the VBA code.
 
Back
Top