I have a real simple project I'm doing using VB6.0. Its a book store inventory. I'm using MS Access as my database. At the moment all I have is entering of records into fields and saving them in the database. I'd like to put coding to deduct from the inventory when a book is purchased and add again when stock comes in. Can anybody help me?
Adding & Deducting Quantities in VB6 & Access
Page 1 of 12 Replies - 881 Views - Last Post: 17 April 2012 - 06:29 AM
Replies To: Adding & Deducting Quantities in VB6 & Access
#2
Re: Adding & Deducting Quantities in VB6 & Access
Posted 16 April 2012 - 08:48 AM
You would have to do the following;
1. Query the existing results in the Access table to see how many of Book "X" are in stock.
2. Create a variable that represents the difference of the query results and the calculation in either direction.
3. Update the table with the new results so Book "X" now has this many in stock.
Some helpful functions for this
Try putting the function to do this together and see how it works. Once we see some code, we can always be more specific with the help
1. Query the existing results in the Access table to see how many of Book "X" are in stock.
2. Create a variable that represents the difference of the query results and the calculation in either direction.
3. Update the table with the new results so Book "X" now has this many in stock.
Some helpful functions for this
rs.addnew rs.update rs.find
Try putting the function to do this together and see how it works. Once we see some code, we can always be more specific with the help
#3
Re: Adding & Deducting Quantities in VB6 & Access
Posted 17 April 2012 - 06:29 AM
Please don't send personal messages asking for help on matters like these. I'm sure that you understand when you think about it that any help you are given is to be shared with the entire community. We can't do that very well if we communicate privately.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|