G
Guest
I am having trouble updating a date value on a building permit form
(frmBPData) when the number of entries on a related subform (sfrmBPPayments)
is greater than 4. The building permit form has a field that I enter
'BPIssueDate' and calculated value 'DateExpire'. The subform, which permits
buying building permit extensions, has a field "BPMonths" indicating the
incremental months to be added to the building permit. A field on the
subform 'BPTotalMonths' sums up the 'BPMonths'.
There is a field on the main form, which calculates a 'BPExpire' date, using
the DateAdd function and "m" referring to 'BPTotalMosnths' and a base date of
'BPIssueDate'. I use some VBA code to write the 'BPExpire' value to a field
'BPExpire' in the table that underlies the building permit form.
Yes I have heard that calculated values should not be stored, but other
parts of the application are easier to program with the stored 'BPExpires'
field.
Everything works great as long as there are four or fewer entries on the
subform. Both 'BPExpire' & 'BPExpires' calculate & record correctly. As
soon as I enter a fifth entry on the subform, 'BPExpire' calculates OK but
the stored value of 'BPExpires' reverts back to the 'BPIssueDate'. I have
over 1000 building permit forms and only four of them have five or more
subform entries. The only building permit forms that don't work correctly
are these four.
Does anybody have an idea why the program works with four subform entries
and fails with five subform entries?
(frmBPData) when the number of entries on a related subform (sfrmBPPayments)
is greater than 4. The building permit form has a field that I enter
'BPIssueDate' and calculated value 'DateExpire'. The subform, which permits
buying building permit extensions, has a field "BPMonths" indicating the
incremental months to be added to the building permit. A field on the
subform 'BPTotalMonths' sums up the 'BPMonths'.
There is a field on the main form, which calculates a 'BPExpire' date, using
the DateAdd function and "m" referring to 'BPTotalMosnths' and a base date of
'BPIssueDate'. I use some VBA code to write the 'BPExpire' value to a field
'BPExpire' in the table that underlies the building permit form.
Yes I have heard that calculated values should not be stored, but other
parts of the application are easier to program with the stored 'BPExpires'
field.
Everything works great as long as there are four or fewer entries on the
subform. Both 'BPExpire' & 'BPExpires' calculate & record correctly. As
soon as I enter a fifth entry on the subform, 'BPExpire' calculates OK but
the stored value of 'BPExpires' reverts back to the 'BPIssueDate'. I have
over 1000 building permit forms and only four of them have five or more
subform entries. The only building permit forms that don't work correctly
are these four.
Does anybody have an idea why the program works with four subform entries
and fails with five subform entries?