I am developing a web-based Access dbase and I need to calculate the number of months between the current date (NOW()) and the date of employment input by the user. The calculated value will be stored in the Access dbase table and displayed in a datagrid and as a read-only label in a form. The two fields in the dbase table are "empDate" and "time_in_Service". I want the calculation to originate and reside in the "time_in_Service" field in the physical dbase, instead of using script on the page to calculate it.
I have tried using the DateDiff function in Access, but the resulting Access message relates that the dbase engine cannot recognize the field name ("empDate") in the function. For example, in the "default value" setting of the "time_in_Service" field, I write the following function;
How do I calculate the months of service as the default value in the "time_in_Service" field based on the current date and a reference to the "empDate" field?