General discussion

Locked

Orders Form in Northwind Database

By julioairizar ·
I am using a database exactly like Northwind sample database with a little changes. In Orders Form, down, at the end you can find a discount field. In my database I prefer to charge a TAX in place to make a discount and I did in that way that Form automatically apply 5% charge to any order. My question is how to make that the form, also automatically dont apply any TAX in case CompanyName client was (for example)"ANAM"? I dont know, maybe is better to create a system which I can use to decide when to apply (manually) TAX charge or not? (for example a check box or something like that?

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Orders Form in Northwind Database

by Duane Pelkey In reply to Orders Form in Northwind ...

Probably the easiest or best way would be to create a tax-exempt field in the Customer table then. This way the form references the customer table and knows wheter it is exempt or not.

Collapse -

Orders Form in Northwind Database

by julioairizar In reply to Orders Form in Northwind ...

Poster rated this answer

Collapse -

Orders Form in Northwind Database

by FirstPeter In reply to Orders Form in Northwind ...

You could write some code to have it perform that lookup, but I think Duane is right - the most efficient method would be to label the customer as tax-exempt in the table itself. That's all assuming, of course, that it's a relatively static state (i.e., all their orders are tax-exempt), which is usually the case with tax exemptions.

The problem with writing code is that you'll end up spending significantly more time maintaining it. At the least you'd probably have another table that has all the valid tax-exempt customers/clients in it (which you'd do a lookup against), and at worst you'd have a very long, error-prone "if" statement that would wreak havoc on maintenance.

Collapse -

Orders Form in Northwind Database

by julioairizar In reply to Orders Form in Northwind ...

Poster rated this answer

Collapse -

Orders Form in Northwind Database

by julioairizar In reply to Orders Form in Northwind ...

This question was closed by the author

Back to Software Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums