Hi,
I am converting an extensive database application from A4 to A5. As an A5 newbie, sometimes I have trouble understanding A5 behavior. In my old database, I had a calculated invoice number for a field based on the last 2 digits of the year (x 1000000) plus the number of the quarter(1,2,3, or 4 x 100000) plus 1000 plus the recno(). This resulted in a unique 8-digit invoice number. This field rule was re-evaluated quarterly and worked fine in A4.
In A5, I set up the calculated rule in the same manner. The problem seems to be that prior to re-evaluating the field rules, I cannot "Mark" records. The record number may have changed because of the deletion and packing of some of the records prior to the quarterly update, but I only re-evaluate this field at the time of quarterly billing. It seems as though in the interim, whenever I try to "Mark" a record, the record is trying to re-evaluate the field rule and causing an error message "Numeric value out-of-range". Why would trying to "Mark" a record cause the field rules to be re-evaluated and thus cause potential error messages?
I changed the field rule to a user-entered default expression which is filled in at the end of the record if the user has not touched the field (which is always the case, because the field is not on the form). Now I can "Mark" records without the above error message. Are there any down sides to this method?
Lastly, any way to force leading zeroes in a numberic field? I couldn't find any references in any of the manuals.
Thank you very much for all your past and future help.
Sincerely,
Robin Sculthorpe
I am converting an extensive database application from A4 to A5. As an A5 newbie, sometimes I have trouble understanding A5 behavior. In my old database, I had a calculated invoice number for a field based on the last 2 digits of the year (x 1000000) plus the number of the quarter(1,2,3, or 4 x 100000) plus 1000 plus the recno(). This resulted in a unique 8-digit invoice number. This field rule was re-evaluated quarterly and worked fine in A4.
In A5, I set up the calculated rule in the same manner. The problem seems to be that prior to re-evaluating the field rules, I cannot "Mark" records. The record number may have changed because of the deletion and packing of some of the records prior to the quarterly update, but I only re-evaluate this field at the time of quarterly billing. It seems as though in the interim, whenever I try to "Mark" a record, the record is trying to re-evaluate the field rule and causing an error message "Numeric value out-of-range". Why would trying to "Mark" a record cause the field rules to be re-evaluated and thus cause potential error messages?
I changed the field rule to a user-entered default expression which is filled in at the end of the record if the user has not touched the field (which is always the case, because the field is not on the form). Now I can "Mark" records without the above error message. Are there any down sides to this method?
Lastly, any way to force leading zeroes in a numberic field? I couldn't find any references in any of the manuals.
Thank you very much for all your past and future help.
Sincerely,
Robin Sculthorpe
Comment