overwrite a calculated field

VbaHell

Well-known Member
Joined
Jan 30, 2011
Messages
1,220
Hello all

I am new to Microsoft Access and would like to ask a question

I have a calculated field which looks at a field called "Total Cost" and divides this by 6 to get the correct VAT value

I sometimes want to edit this field if the product has a reduced or no VAT charge

Is there a way to have a calculate field that you can edit please
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Although Access allows for calculated fields, in the mind of good Access developers, this is a no-no. Calculations should only be done in Queries which allow for the functionality and flexibility you seek. Having calculated fields create issues similar to what you are experiencing.
 
Upvote 0
Is this a calculated field on a table? As per the above comment this is generally a bad idea - and bad design.

e.g. Vat is currently 20%, what if it changes to be 21%... If you update the formula then it will update for previous orders causing all historic data to be incorrect.

regardless of where it is being calculated (table, form, query) it can be done. I would add a field to the table (say VAToverride) and get the calculation to check that is 0 before calculating the VAT.

The expression would be something like: IIf([VAToverride]=0,[Total Cost]/6,[VATOverride])

I would recommend you save the vat rate in the order and use that for the calculation - that way if you look at the record in the future you should easily be able to work out the correct vat amount.
 
Last edited:
Upvote 0
What you are both saying makes clear sense, it's a bad idea, I am very new to Access so starting to learn these pitfalls

Thanks
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,241
Members
452,622
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top