If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Access > How to store tax rates

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-03-09, 17:50
nfw04 nfw04 is offline
Registered User
 
Join Date: Jun 2009
Location: British Columbia, Canada
Posts: 29
How to store tax rates

Hi guys, you've been really helpful to me in the past!

I'd like to let my users have the option of changing the sales tax rates if the situation ever arises. I have VBA functions that return grand totals from subtotals and the tax rate is hard-coded.

I've created an Options table where I'm thinking of storing these tax rates, but it seems that I would have to query the database to retrieve the tax rates -- something I would like to avoid if possible.

Does anyone have any ideas on the best way to store a user-editable tax rate in a database, and if you've implemented something similar in your database, what was your solution?

Thanks guys!
Reply With Quote
  #2 (permalink)  
Old 07-03-09, 19:07
nckdryr nckdryr is offline
Computer Monkey
 
Join Date: May 2005
Posts: 1,191
Quote:
Originally Posted by nfw04
I'd like to let my users have the option of changing the sales tax rates if the situation ever arises. I have VBA functions that return grand totals from subtotals and the tax rate is hard-coded.
Well if it needs to be user-selectable, then it can't be hard-coded.
Quote:
Originally Posted by nfw04
I've created an Options table where I'm thinking of storing these tax rates, but it seems that I would have to query the database to retrieve the tax rates -- something I would like to avoid if possible.

Does anyone have any ideas on the best way to store a user-editable tax rate in a database, and if you've implemented something similar in your database, what was your solution?
Well, if you need to store it then I think you're going to need a table. A question I have for you is do you want the tax to be user specific, or something else like state-specific or product-specific, etc?

I don't think it would be too hard to look up the tax rate from a table and use that in your code instead of hard-coded. You can do something even as basic as a dlookup, or better yet an elookup.
__________________
Me.Geek = True
Reply With Quote
  #3 (permalink)  
Old 07-03-09, 19:30
nfw04 nfw04 is offline
Registered User
 
Join Date: Jun 2009
Location: British Columbia, Canada
Posts: 29
Great, thanks a lot. I wasn't aware of these methods. I'm in Canada, so I'm going to need it to include PST and GST. Problem solved though, thanks!
Reply With Quote
  #4 (permalink)  
Old 07-04-09, 08:34
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
Quote:
Originally Posted by nfw04
I'm in Canada, so I'm going to need it to include PST and GST.
don't forget that PST and GST are disappearing soon!!!

(to be replaced by the HST)
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #5 (permalink)  
Old 07-04-09, 13:02
nfw04 nfw04 is offline
Registered User
 
Join Date: Jun 2009
Location: British Columbia, Canada
Posts: 29
Quote:
Originally Posted by r937
don't forget that PST and GST are disappearing soon!!!

(to be replaced by the HST)
Really? When is that supposed to happen? I'm surprised I didn't hear about that!

EDIT: Figured out why I didn't hear about it -- it's only Ontario!

Last edited by nfw04; 07-04-09 at 13:10.
Reply With Quote
  #6 (permalink)  
Old 07-04-09, 13:09
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #7 (permalink)  
Old 07-06-09, 14:44
nfw04 nfw04 is offline
Registered User
 
Join Date: Jun 2009
Location: British Columbia, Canada
Posts: 29
What a horrible time to increase taxes...
Reply With Quote
  #8 (permalink)  
Old 07-06-09, 14:52
Teddy Teddy is online now
Purveyor of Discontent
 
Join Date: Mar 2003
Location: The Bottom of The Barrel
Posts: 6,075
Quote:
Originally Posted by nfw04
I've created an Options table where I'm thinking of storing these tax rates, but it seems that I would have to query the database to retrieve the tax rates -- something I would like to avoid if possible.
Why? It's pretty cheap to hit a small table in a self-contained Access application. If you need ultra-high performance, you may want to look at other platforms...

I would STRONGLY recommend using a tax table so you can:

a) store multiple tax TYPES
b) store multiple VERSIONS of a given tax type
c) delegate maintenance of current tax information to appropriate resources.
__________________
oh yeah... documentation... I have heard of that.

*** What Do You Want In The MS Access Forum? ***
Reply With Quote
  #9 (permalink)  
Old 07-06-09, 15:05
nfw04 nfw04 is offline
Registered User
 
Join Date: Jun 2009
Location: British Columbia, Canada
Posts: 29
Quote:
Originally Posted by Teddy
Why? It's pretty cheap to hit a small table in a self-contained Access application. If you need ultra-high performance, you may want to look at other platforms...

I would STRONGLY recommend using a tax table so you can:

a) store multiple tax TYPES
b) store multiple VERSIONS of a given tax type
c) delegate maintenance of current tax information to appropriate resources.
Great, thanks a lot. I'm new to database development (Starting my fourth year of Computer Science in the fall; my current project is for a Co-op work term), so I'm still learning the ins and outs. It's been really interesting thus far!
Reply With Quote
  #10 (permalink)  
Old 07-06-09, 15:42
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,246
best way in my books is to have a table which identifies the tax rate(s) applicable and store that code against the product

if you have multiple taxes applied to the same sales line then you may need to have multiple flags against the product line

in the UK we (thankfully only have the single sales tax called VAT... there are IIRC 4 rates.. exempt, zero rated, fuel rate and standard rate.) so its a single rate code per product.

one thing to bear in mind if you are coding things like tax rates is how you handle changes in rates, especially if you have to manage invoicing over thsat transition period. so you need to either store a taxrate and validity or when you create an invoice copy the valid taxrate of the moment
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #11 (permalink)  
Old 07-06-09, 15:52
SimonMT SimonMT is offline
Registered User
 
Join Date: Sep 2006
Posts: 265
I think you need to have a standard rate on Products and the ability to vary Sales Tax on Invoicing.

There should be a Sales Tax file to be selected during the Invoice process, I don't know about the Canadian system but it is a good idea to include the Sales Tax code down on each Invoice line. The Sales Tax value should also be stored on each Invoice line item.

When rates change if you store the standard Sales Tax Value you will need to reprice however wholesale Price changes often follow Sales Tax variations.

Simon
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On