![]() ![]() ![]() Ideally, warranty duration should be straight number but FM actually can handle it fine so there is no need to change your radio buttons. I used LeftWords() over Left() because you might have another product with a longer duration than 9 years. If you want to always get the same month (and USUALLY the same day), then I suggest you instead use:ĮxtendDate = Date ( Month ( InitialDate ) Day ( InitialDate ) Year ( InitialDate ) + LeftWords ( WarrantyDuration 1 ) ) ĮxtendDate - ( Month ( ExtendDate ) > Month ( InitialDate ) ) ![]() If careful you will NOT get consistent results. Alan gave you one approach but I think of a year as meaning the same month and day – only adding the warranty duration years. Even if you are convinced you don’t need a Products table, you can have the warranty duration handled automatically by hard-coding the evaluation on the Warranty duration field instead!Īlso, it would help to get clarity on what you mean by a year. The EndDate would calculate and pre-fill (by using the suggested Auto-Enter calculation) but pulling from the Products table. In fact, the warranty duration wouldn’t need to even be in this table. This would allow 1) adding more products as your business grows, 2) changing the warranty duration as needed without changing a hard-coded calculation and 3) removing the User’s burden of selecting the warranty duration. Ideally, you would have a Products table and store the warranty duration there. How are you structuring this? Is a User selecting the warranty duration in the radio button? If so, they shouldn’t need to. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |