UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
> Point Of Sale Screen Display, Any Version    
 
   
Peter Hibbs
post Apr 23 2012, 10:26 AM
Post#1


UtterAccess VIP
Posts: 1,787
Joined: 17-June 10
From: Dorset. UK.


On a typical Point-of-Sale screen a form would probably have a number of grouped buttons which represent various options that the user can select as well as a menu system to select groups of items. For example, a restaurant terminal where the check out operator would be able to select a main type of item (Beverages, Drinks, etc) and then choose items within the selected group to add to the bill.
The conventional method to create this sort of form would be to have dozens of separate buttons on the form which would have the captions changed whenever a group was selected and some code behind every button to process the events depending on the currently selected group. The problem with this method is that it is not very flexible and making any changes to the form contents can result in a lot of changes to the VBA code which can be 'messy' and time consuming.
Where the screen buttons are the same size and are in a specific grid pattern it can be easier and more efficient to use a different technique to detect the buttons that are pressed by the user and that is to use a single transparent button over a grid of Label controls and when a square in the grid is clicked, the X and Y co-ordinates of the button are used to determine which grid cell was selected and take the appropriate action. In the attached demo below, there are a possible 192 selections available to the user but there are only two Command buttons on the whole form (see the screen shots below). This means that only a few lines of VBA code are required to give a large number of possible choices to the user which, in turn, is easier to program and maintain. Also, since the button captions (and other parameters such as colors, format, etc) are stored in a table, it is easier for the users to set up their own screen layout by providing them with a form in which they can edit or add to the various groups and sale items on the form (this facility is not provided in this demo though). The main criteria for the grid layout is that all the Label controls must be the same size and shape so that the position of the label can be calculated from the X and Y co-ordinates of the hidden button when the button is clicked.
The table (tblSaleItems) holds the information for each sale item name, the price of the item, the main group in which it belongs and a location reference which determines in which grid cell the item will be displayed. This is the grid co-ordinate in the format 00 (top left cell) to 53 (bottom right cell). The ItemRef field is an AutoNumber field and is not actually used in the demo. The VBA code is fairly well documented but if there is anything that is not clear then feel free to post any questions here. Note that the blank cells need some character (I have used an asterisk) because a Label type control will not display if it has no caption value. Of course, in a real PoS database there would need to be more code to add the prices together for each selected item and display the total on screen, edit an item price, print a bill, etc, etc but this demo is only intended to demonstrate the button selection technique. Also note that if you want to change any of the Label controls on the form you will need to move the 'invisible' button out of the way first. In fact, you could make these buttons very small in Design mode and then resize and re-position them at Run time which would make altering the form controls a bit easier at Design time.
The 12 button keypad (which is separate from the main demo) just shows how the same method could be used to enter a number into a Text field. The button events for the hidden button here are also used to change the label Special Effect property to simulate a button press.
This demo is written in A2003 but works OK in later versions.
Peter Hibbs.
Attached File(s)
Attached File  POS_Image_1.png ( 36.19K )Number of downloads: 1066
Attached File  POS_Image_2.png ( 36.62K )Number of downloads: 783
Attached File  POS_Demo.zip ( 133.17K )Number of downloads: 962
 
Go to the top of the page
 

Posts in this topic
- Peter Hibbs   Point Of Sale Screen Display   Apr 23 2012, 10:26 AM
- - ixxo09   Hello Peter nice job with this code. I need some ...   Oct 25 2018, 06:29 PM
|- - Peter Hibbs   Hi ixxo09, Not sure if this is exactly what you a...   Oct 26 2018, 10:40 AM
|- - JtrilloJ   Peter: An excellent work of yours. Congratulations...   Oct 26 2018, 12:08 PM
|- - ixxo09   Hello Peter First of all thank you very much ...   Oct 26 2018, 12:10 PM
||- - Peter Hibbs   Hi Jacinto, OK, thanks very much for that update,...   Oct 26 2018, 01:01 PM
|- - 961414   hello how can i make cmditem 6 vertical and 5 hor...   Aug 12 2019, 12:49 AM
|- - Peter Hibbs   Hi, It is a bit difficult to understand your ques...   Aug 12 2019, 10:40 AM
- - tserhung   Hi Peter Hibbs, Thank you for sharing your amazin...   Nov 19 2018, 01:36 AM
- - Peter Hibbs   hi tserhung, OK, firstly, if you want to use the ...   Nov 19 2018, 07:22 AM
- - tserhung   Hi Peter Thank you for your valuable advice and ...   Nov 21 2018, 01:05 AM
- - ZapDude   QUOTE I have used an asterisk) because a Label typ...   Nov 23 2018, 03:22 PM
- - Peter Hibbs   Hi ZapDude, OK, thanks for the info, I am sure th...   Nov 25 2018, 07:54 AM
- - ixxo09   Hello everybody: I need a little bit of help. Do...   Nov 30 2018, 04:22 AM
- - Peter Hibbs   Hi ixxo09, What exactly are you trying to do and ...   Dec 5 2018, 07:15 AM
- - ixxo09   Hello Peter thanks for reply. Already Sorted It o...   Dec 5 2018, 08:21 AM
- - Peter Hibbs   OK, excellent. Peter.   Dec 5 2018, 08:55 AM
- - FrankRuperto   I have a customer who is looking for an Access-bas...   Jun 18 2019, 11:22 PM
- - Peter Hibbs   Hi Frank, OK, do you have a question or is this j...   Jun 19 2019, 04:15 AM
- - FrankRuperto   Hi Peter, yes, I need to find an Access based rest...   Jun 19 2019, 07:32 AM
- - Peter Hibbs   Hi Frank, OK, you are welcome to download any of ...   Jun 19 2019, 07:46 AM
- - FrankRuperto   Hi Peter, thanks for your permission to reuse your...   Jun 19 2019, 10:46 AM
- - Peter Hibbs   Hi Frank, Yes, I remember that thread but I have ...   Jun 20 2019, 07:28 AM



Custom Search


RSSSearch   Top   Lo-Fi    30th March 2020 - 08:26 AM