In an earlier lesson we had state taxes, federal taxes etc. I understand perfectly. In new Zealand we have just one sales tax called G.S.T. ( Goods & Services Tax) @15%. All goods are sold inclusive of G.S.T. To get the G.S.T. content you have to multiply by 3 then / 23 which gives you the G.S.T. content. To normalise the Data Base how can I have this in on place i.e. in the Organisational table. At the moment I have the calculations in the queries, which is not ideal. I am sure the answer is simple, it just escapes me at the moment.
Adam Schwanz
@Reply 5 years ago
If I understand what you're saying, you just want an easy way to always use NZ tax, you could make a global function and send it the number in question.
Something like
Public Function NZTax (X As Double)
X * 3 / 23
End Function
Public Function NZTax (X As Currency) As Currency
NZTax = Round(X*3/23,2)
End Function
Juan C Rivera
@Reply 5 years ago
Good Morning Richard I like the NZ with a function. this is a 1st for me on your next talk Quick Queries can you talk on this or maybe do a tech tip and include this?
Big Thanks
Juan
But I think you might have that confused with NZTax - which Adam so named because it's for New Zealand. Nothing special about that function name. :)
Dave IngramOP
@Reply 5 years ago
Thanks for the input. This where my lack of knowledge takes over. I understand the function, not sure where I put it? I am only at level 12 on the expert series, with a long way to go yet. Really appreciate the help.
Juan C Rivera
@Reply 5 years ago
WOW I need to make sure i have coffee before sending emails. When I saw NZTax () my eyes saw Public Function NZ(tax) as currency. I was just stun that that was possible. Now 3 cups of Cafe Bustelo Im bouncing off the walls I see what I did.
Sorry everyone, just going crazy here.
V/r
Juan
Adam Schwanz
@Reply 5 years ago
Yea Dave, you might want to hold off on this until you reach developer classes and actually get into VBA, it's jumping a few too many steps. Just remember it's possible and work to it.
I can tell you to put it in a global module, but you may not understand that either or how the function works throughout the database.
You'll have a much better understanding and appreciation for VBA if you hold off on it until you start the developer lessons.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Access Expert 13.