Hi, hope someone can be of help here please? First, apologies for kength of post.
I have a database which is to replicate an EPOS, in particular the barcode input (I plan to buy a scanner for this part later). The tables are as follows:
Product: Barcode (Key), Product ID (Indexed to not allow duplicates), Description, Cost Price, Sell Price
Transactions: Transaction Number (Key), User ID, Date, Transaction Total
User: User ID (Key), User Details
Transaction/Product Transition: Transaction Number and Barcode set as composite key to link the many to many relationship between Transactions table and Product table.
I've created a form with subform Transactions/TranSub
On the Transactions form are the following fields:
Transactions.Transaction Number
.User ID
. Date
.Transaction Total
In addition to this I have created a textbox, Input, into which data is to be fed to drive the actions on the form, namely the barcode when scanned.
On the TranSub subform are the following:
TranSub.Barcode
TranSub.Quantity
Product.Description
Product.Sell Price
Now to the crux. Access will not allow me to make multiple scans of the same item since the field, Barcode, is a primary key in the Transactions table. I could run a system where quantity is manually entered to get around this but in reality that is not how it would work in the field and the idea behind this demo is to get a theoretical client to adopt a EPOS on their delivery vans.
I need to write some code whereby when an input is made into the Input box, this is automatically checked against existing barcode entries for that transaction. if none exist the same then it will enter the data into the Barcode field on the subform, thus bringing up the rest of the product details. if however the barcode already exists in this transaction, the quantity of the existing entry is incremented by 1.
i'm sure it's possible but i've read about 3 books, from Dummies to professional tome and i am no further forward. Could someone please help me with this?
many thanks, Lol
I have a database which is to replicate an EPOS, in particular the barcode input (I plan to buy a scanner for this part later). The tables are as follows:
Product: Barcode (Key), Product ID (Indexed to not allow duplicates), Description, Cost Price, Sell Price
Transactions: Transaction Number (Key), User ID, Date, Transaction Total
User: User ID (Key), User Details
Transaction/Product Transition: Transaction Number and Barcode set as composite key to link the many to many relationship between Transactions table and Product table.
I've created a form with subform Transactions/TranSub
On the Transactions form are the following fields:
Transactions.Transaction Number
.User ID
. Date
.Transaction Total
In addition to this I have created a textbox, Input, into which data is to be fed to drive the actions on the form, namely the barcode when scanned.
On the TranSub subform are the following:
TranSub.Barcode
TranSub.Quantity
Product.Description
Product.Sell Price
Now to the crux. Access will not allow me to make multiple scans of the same item since the field, Barcode, is a primary key in the Transactions table. I could run a system where quantity is manually entered to get around this but in reality that is not how it would work in the field and the idea behind this demo is to get a theoretical client to adopt a EPOS on their delivery vans.
I need to write some code whereby when an input is made into the Input box, this is automatically checked against existing barcode entries for that transaction. if none exist the same then it will enter the data into the Barcode field on the subform, thus bringing up the rest of the product details. if however the barcode already exists in this transaction, the quantity of the existing entry is incremented by 1.
i'm sure it's possible but i've read about 3 books, from Dummies to professional tome and i am no further forward. Could someone please help me with this?
many thanks, Lol