Need Help In barcode Scan to Load the Item Detail in POS Subform

ZKHADI

Member
Local time
Today, 07:49
Joined
Apr 5, 2021
Messages
118
Hi my respected teachers.

i need help in above subject. i am working on my POS i put image and database below.
in the image there is a list box of items on double click on any item it load into subform
but barcode is not connect because i dont know how do i connect. give me suggestion or work
in my uploaded database.
the item box is based on calculated query name ItemLiqQ1 and need to pick data from query or listbox because table is not calculated

waiting for reply
 

Attachments

  • Barcode.png
    Barcode.png
    144.1 KB · Views: 306
  • my pos.zip
    my pos.zip
    514.7 KB · Views: 584
in the afterupdate event of the barcode box, run an append query to add that item to the target table
then refresh the subform so it shows: subfrm.requery
 
As I mentioned in your other thread:-


you would be better off hammering out the steps you need to take before you start undertaking any work. Your first step should be to successfully capture the barcode.

I usually capture the barcode into to an unbound text box. I do this because you don't necessarily want to store the barcode straightaway. For instance what happens when somebody scans something that isn't in your database? To tackle this possible error you need to scan the item, then search the list of products to see if the product actually exists! If it doesn't exist you tell the user that they've either scanned the barcode on the sandwiches they just bought in Marks and Spencer's, or they've got a new product which needs entering into the products table before it can be scanned into the line item table.

The other possibility is that the user may scan in 6 identical items now instead of having 6 line items added you might want to add one single line item and and show it as 6 items being added. What do you do if someone scans the item twice and it's added to the list twice question mark you will need the ability to scan it gain and remove it from the list.

More Info on my Website HERE:-

 
Last edited:
I am curious, what do you intend to do with this POS system?
 
As I mentioned in your other thread, you would be better off hammering out the steps you need to take before you start undertaking any work. Your first step should be to successfully capture the barcode.

I usually capture the barcode into to an unbound text box. I do this because you don't necessarily want to store the barcode straightaway. For instance what happens when somebody scans something that isn't in your database? To tackle this possible error you need to scan the item, then search the list of products to see if the product actually exists! If it doesn't exist you tell the user that they've either scanned the barcode on the sandwiches they just bought in Marks and Spencer's, or they've got a new product which needs entering into the products table before it can be scanned into the line item table.

The other possibility is that the user may scan in 6 identical items now instead of having 6 line items added you might want to add one single line item and and show it as 6 items being added. What do you do if someone scans the item twice and it's added to the list twice question mark you will need the ability to scan it gain and remove it from the list.

More Info on my Website HERE:-

Yes i visited and i watched the video. but! i didn't see where is coding or example file?
 
I didn't see where is coding or example file?

There isn't an example file/code.

However I can outline the steps you need to take.

First step, have you been able to capture a barcode into a text box with a barcode scanner?
 
There isn't an example file/code.

However I can outline the steps you need to take.

First step, have you been able to capture a barcode into a text box with a barcode scanner?
i know how to capture a code in txtbox. but how to load information about that item which is scanned to the related boxes. like price quantity. if we scan again and again the quantity should be increase.
 
i know how to capture a code in txtbox.

That's good.

The next test to do is, when the scan has taken place and the barcode is present in the textbox, have the textbox after update event to show a message box.
 
Once you are able to capture the barcode into VBA you can then use the barcode in a function to determine how many occurrences of that barcode reside in your subform.

I use a function that returns 0 when none are found, returns 1 when 1 is found, returns 2 if there are multiple occurrences.

This function triggers other functions depending on the return.

If 0 (zero) then add the record.

If 1, then add to the quantity.

If more than 1, you have a problem, report it to the developer.

I think I got my count function from Microsoft, but it's written in ADO and will need converting to DAO, alternatively, use DCount.

I'm not going to write the code for you, as my purpose here is to help you become an MS Access VBA developer.
 
Before you check to see if the barcode is in your subform, you should check to see if it is actually a product in your product table! It could be that someone has scanned the barcode on their KitKat!
 
It could be that someone has scanned the barcode on their KitKat!
Just in case we are running into a language barrier, a KitKat is a sweet, a chocolate bar that a worker might take with them to work and eat at their desk. They might be tempted to scan the barcode on the KitKat to see what happens to your system. What do you want to happen if the the worker scans their KitKat? This is one of the questions you need to answer. But as I said earlier it's down to you how you want the system to function.
 
I've got a better idea, let's skip the problem of an incorrect barcode being entered and go straight to the the guts of the problem. When you scan an item you want to add it into the subform, along with other details about the item. Also if the item is scanned again, you want to add to the item Quantity.
 
Well I'm afraid I've got some bad news for you.

I've had a look at your database and it is in no way set up properly for taking orders. It needs an invoice table and a line items table for a start. I'm not even sure that it's got a product list, it's got something that looks like a product list, but I'm not sure it's suitable.

However I do have some good news. Microsoft have an invoicing demonstration in the earliest Northwind sample database which you can download here:- NOTE - Enter Zero (0) to get it for free.


Unfortunately, as it stands, that's not the solution to your problem, because the Microsoft Northwind database itself is not set up properly. I cover some of the issues with it in my blog here:-


You will need to correct those issues before proceeding with the Northwind sample. Be warned! There maybe other issues with it I don't know about.

Once you've got a working sample database based on the Northwind sample, then we can proceed to add barcode scanning.

More Info on the Northwind dB Here:-
 
Last edited:
Hi my respected teachers.

i need help in above subject. i am working on my POS i put image and database below.
in the image there is a list box of items on double click on any item it load into subform
but barcode is not connect because i dont know how do i connect. give me suggestion or work
in my uploaded database.
the item box is based on calculated query name ItemLiqQ1 and need to pick data from query or listbox because table is not calculated

waiting for reply

create combox and point to location to sending, refer attachment
 

Attachments

  • Screenshot 2022-11-16 150657.png
    Screenshot 2022-11-16 150657.png
    95.5 KB · Views: 91

Users who are viewing this thread

Back
Top Bottom