Recordsets and Updatable Fields

J

jm

I’m trying form a recordset where some of the fields are
calculated based on data from other records. As an
example, I’d like to have a field give the percent
difference between a number in the current record, and the
number in the same field of a different record. I’m
currently able to display the correct value in a form, but
it is an unbound control. I’d like to bind it to a field
in a recordset. The problem I’m running into is how to
create the field in the recordset. By including a
calculated field set to equal 1 in a stored query, the
field is not updatable, so I can’t change the field’s
value. I’ve tried using ADO where fields can be appended
to the recordset, but they can only be appended before the
recordset is opened, and once I open the recordset using
the query, my appended fields have been written over by
the fields returned by the query. The only way I’ve found
to make the fields updatable is to include them in the
original table, thus significantly bloating the database.
Am I going about this wrong? Is it possible to include
these fields in the recordset, or I am I better off simply
computing these each time I display the record? I’d like
to be able to keep these values in the recordset for
display in forms, reports, and possibly even charts in the
future without having to recalculate each time. Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top