greensleeves149
Member
- Local time
- Tomorrow, 08:11
- Joined
- Feb 27, 2022
- Messages
- 49
Hi all,
I've got a database which records purchases and sales. What I'm trying to do is if say we have 20 Units of Product A available, to stop a user from accidently entering anything over 20 sales of Product A. The same should be applied for Product B, C etc.
I've been unsuccessful for a while now on how to get my form to do this and produce a messagebox to warn the user and prevent the data entry so I thought I would reach out for some guidance.
I've put together a really simple database attached that is similar to my actual database. If you load the form "frmMain", you will see 2 subforms on there. The first shows the available inventory in stock and the second is for the user to enter the allocation of that stock. When the user enters the "Quantity" amount on the Allocation of Units form, I was wanting the database to check if there was enough stock of that product, or produce a message to tell the user to correct the quantity and prevent the entry.
Could someone please enlighten me how to prevent an overallocation of a product please?
I've got a database which records purchases and sales. What I'm trying to do is if say we have 20 Units of Product A available, to stop a user from accidently entering anything over 20 sales of Product A. The same should be applied for Product B, C etc.
I've been unsuccessful for a while now on how to get my form to do this and produce a messagebox to warn the user and prevent the data entry so I thought I would reach out for some guidance.
I've put together a really simple database attached that is similar to my actual database. If you load the form "frmMain", you will see 2 subforms on there. The first shows the available inventory in stock and the second is for the user to enter the allocation of that stock. When the user enters the "Quantity" amount on the Allocation of Units form, I was wanting the database to check if there was enough stock of that product, or produce a message to tell the user to correct the quantity and prevent the entry.
Could someone please enlighten me how to prevent an overallocation of a product please?