Access Newbie - Access Formula/ expression for division with yes check box selected - Help

Joined
Jan 11, 2014
Messages
2
Reaction score
0
Hello My Name is Greg

I am an Access Novice and would like it to calculate the following,
I am trying to get it to calculate the following: if field [VATable Yes or No] = "Yes" then divide [Amount] / 6

I want it to calculate the VAT for the amount entered in the [Amount] field if yes is checked in the [VATable Yes or No] field by dividing the [Amount] field by 6,

Please help with the actual expression/formula using the field names/labels I have used!!! I am using Access 2007 and I am not good at coding at all.

Please help?

Cheers:(:(
 
I am not able to gather enough information to give you a direct answer but I can help a little bit. I am guessing that you have a table with various fields including but not limited to [Product] (What the product is), [Amount](The number of that particular product), [Price](the price for each particular product), [VAT](a yes/no field for keeping track if VAT is charged for that product), and [Extended](the extended price if VAT is included) I am guessing that you want this calculated on a form and not kept in the table.
On the last field in the form write VBA code for property AFTER UPDATE
IF Me.VAT.Value = True Then
[Extended]=[Amount]*[Price]*6
Else
[Extended]=0
End If

Or you could use:
[Extended]=[Amount]*[Price]
that code would go between Else and End If.

Hope that helps.
I do most of my work with VBA code. I am sure there are other ways but VBA works for me.
 
Back
Top