Table with just one value

latex88

Registered User.
Local time
Today, 12:18
Joined
Jul 10, 2003
Messages
198
I'm sure this is not ideal or a sophisticated approach, but this is what I'm thinking of doing. I am creating a POS system that needs to store sales tax rate, so the total can be calculated accordingly. As sales tax rate changes periodically, I want to create a form to allow the user to be able to change it. I will create a table to holds that value which feeds the form.

Because there is only one number in the entire table, is there a way to block the table from accepting more records than one? Or there's a much better and efficient approach than I've mentioned?
 
A company table with one record, with the Sales Tax loaded onto a Form and used throughout the application would work or something similar.

I have a companies (multi-company) table that has the default Sales Tax and this is used as the default value however I need the users to change Sales Tax type within the Sales system so there needs to be some flexibility in the type of Sales Tax.

Simon
 
As long as you only use a form to edit it you can set the form's Allow Additions to NO and Allow Deletions to NO and Allow Edits to YES. Then, one record it is always.

But like Simon, my POS system I built for a local hospital here in Portland needed to have the ability to have multiple sales tax rates (and even down to each individual item as part may have been picked up locally and the rest shipped) so I just filled the rate field for that item on the after update of the add item button but it was available to where I could change the rate if the default wasn't the needed item.
 
As long as you only use a form to edit it you can set the form's Allow Additions to NO and Allow Deletions to NO and Allow Edits to YES. Then, one record it is always.

But like Simon, my POS system I built for a local hospital here in Portland needed to have the ability to have multiple sales tax rates (and even down to each individual item as part may have been picked up locally and the rest shipped) so I just filled the rate field for that item on the after update of the add item button but it was available to where I could change the rate if the default wasn't the needed item.

Your suggestion works great with it. I was not aware you can do that with a form. Thanks.

I now need to add a form to allow the restaurant owner/workers to insert a discount on a bill. I also need to carry this out to the end when printing out the ticket and store it for historical record. I guess I can use the same approach, but isn't there a way to use VBA and set a public variable? I wonder that would be a better approach.
 
Why not just have a field in the table to store the discount (either by percentage or by amount) and then you can bind the control to the field.

In fact, I posted my POS in this thread (there are a few errors that pop up for some reason but you should be able to get the picture):

http://www.access-programmers.co.uk/forums/showthread.php?p=960774&highlight=Point+Sale#post960774

So maybe you can gather some ideas from it. Now, that being said, I did this about 5 years ago so I would probably do some things different today. :)
 

Users who are viewing this thread

Back
Top Bottom