PaquettePaul
Member
- Local time
- Yesterday, 20:55
- Joined
- Mar 28, 2022
- Messages
- 107
Not really looking for a solution but thought I would share an experience.
I develop my code using Access 2019 and it operates in production using the free RunTime version of Access.
I have a routine in my financials generation process that calculates a base taxable amount and applies a 5% tax to it. initially, I stored the tax rate in a configuration record in the database (a backend version) and loaded the value into global variable gblGstRate (defined as double) at startup. I then applied that rate during the financials calc. A problem occurred in that the GST tax amount was not being calculated for the odd invoice. I went back and changed the SQL which retrieves the merchandise/service records records thinking that might be a problem as well as changing the gblGstRate to a value that is set to a fixed value of 0.05 during startup.
Ran the financials Routine in full Access and it worked as expected. Ran it in a split database in a RunTime environment and the GST was not calculated. Harrumph. Changed the code to show the taxable amount, the GST rate, and the derived tax amount. In the full access version, the tax rate was shown as 0.05 and, in the RunTime environment, the tax rate was shown as zero. Another harrumph.
So, enough with this nonsense, I changed the tax calculation to ”tax amount = taxable amount * 0.05”. Now the tax calculation works in both access environments.
Does anyone have any thoughts on why the problem occurred in the first place given that the code acts differently in the two environments?
I develop my code using Access 2019 and it operates in production using the free RunTime version of Access.
I have a routine in my financials generation process that calculates a base taxable amount and applies a 5% tax to it. initially, I stored the tax rate in a configuration record in the database (a backend version) and loaded the value into global variable gblGstRate (defined as double) at startup. I then applied that rate during the financials calc. A problem occurred in that the GST tax amount was not being calculated for the odd invoice. I went back and changed the SQL which retrieves the merchandise/service records records thinking that might be a problem as well as changing the gblGstRate to a value that is set to a fixed value of 0.05 during startup.
Ran the financials Routine in full Access and it worked as expected. Ran it in a split database in a RunTime environment and the GST was not calculated. Harrumph. Changed the code to show the taxable amount, the GST rate, and the derived tax amount. In the full access version, the tax rate was shown as 0.05 and, in the RunTime environment, the tax rate was shown as zero. Another harrumph.
So, enough with this nonsense, I changed the tax calculation to ”tax amount = taxable amount * 0.05”. Now the tax calculation works in both access environments.
Does anyone have any thoughts on why the problem occurred in the first place given that the code acts differently in the two environments?