I have a number of calculated fields in a subform that are coded into controls for the sake of speed and because they are always recalculated when their parents change. I want to write these back into the table in unbound fields - why because I want to track what data was used at the time of calculation in case the user changes their mind! I also want to use these pieces of data for reports and I don't want to programme reports with lots of concurrent data back to the form.
Here is my question.
If I use a calculated field on the form I cannot bind it and so I have to have a way of reading the fields record by record and then writing back to the database the final answers.
I have enough knowledge to use a recordset to read in the record from the data table and can change the first item in the form, however I think what I need to do is
Load the recordset
while not EOF
Read the ID of the first record in the form
Search the recordset for the ID
Update the recordset with the calculated fields using me!field
Move to the next record in the table (How do I do this)
Search again
Is this right and how do I point focus back to the subform record if the process is initiated from a button outside?
Or am I doing this the hard way is there a simpler method
Thanks - BTW I have read through the cookbook already and missed this issue
Here is my question.
If I use a calculated field on the form I cannot bind it and so I have to have a way of reading the fields record by record and then writing back to the database the final answers.
I have enough knowledge to use a recordset to read in the record from the data table and can change the first item in the form, however I think what I need to do is
Load the recordset
while not EOF
Read the ID of the first record in the form
Search the recordset for the ID
Update the recordset with the calculated fields using me!field
Move to the next record in the table (How do I do this)
Search again
Is this right and how do I point focus back to the subform record if the process is initiated from a button outside?
Or am I doing this the hard way is there a simpler method
Thanks - BTW I have read through the cookbook already and missed this issue