Hi
In my customer table I have set two fields to yes/no, gst and pst. In my product table I set the same field for taxes.
I have some clients who are taxable(because of location) and some products are not taxable.
In my form orders I inserted gst and pst from the customer table, in my subform I inserted the gst and pst from product table.
If a customer is taxable and the product is not I would like the taxes for the product to be 0.
Right now I am using this statement in my subform in producID After Update
Me![orderdetails.gstID] = (Forms![Orders].Form![customer.gstID]) - (DLookup("[gstID]", "[product]", "[productID]=Forms![orders]![ordersdetails subform].Form![ID]"
) + (DLookup("[gstID]", "[product]", "[productID]=Forms![orders]![ordersdetails subform].Form![ID]"
)
Me![orderdetails.pstID] = (Forms![Orders].Form![customer.pstID]) - (DLookup("[pstID]", "[product]", "[productID]=Forms![orders]![ordersdetails subform].Form![ID]"
) + (DLookup("[pstID]", "[product]", "[productID]=Forms![orders]![ordersdetails subform].Form![ID]"
)
But right now if the client is taxable and the product is not, it choses taxable.
Also with the above statement if the client is not taxable the product shows as not taxable and that's ok.
Can someone help me
Thanks
Frank
In my customer table I have set two fields to yes/no, gst and pst. In my product table I set the same field for taxes.
I have some clients who are taxable(because of location) and some products are not taxable.
In my form orders I inserted gst and pst from the customer table, in my subform I inserted the gst and pst from product table.
If a customer is taxable and the product is not I would like the taxes for the product to be 0.
Right now I am using this statement in my subform in producID After Update
Me![orderdetails.gstID] = (Forms![Orders].Form![customer.gstID]) - (DLookup("[gstID]", "[product]", "[productID]=Forms![orders]![ordersdetails subform].Form![ID]"
Me![orderdetails.pstID] = (Forms![Orders].Form![customer.pstID]) - (DLookup("[pstID]", "[product]", "[productID]=Forms![orders]![ordersdetails subform].Form![ID]"
But right now if the client is taxable and the product is not, it choses taxable.
Also with the above statement if the client is not taxable the product shows as not taxable and that's ok.
Can someone help me
Thanks
Frank