ChrisTheAncient
Technical User
Progressing along quite nicely with a little database for things I'm hoping to sell. My database is based on the classic NWinds one from MS.
I have a 'main' order Form with an embedded subForm to itemise goodies sold to an individual customer
To help me along, I'm trying to embed a sort of stock control so I know what is in stock at the end of each transaction.
So far, I've successfully made the subform decrement the stock as each item is added to an order by using
Me!UnitsInStock = Me!UnitsInStock - 1
in the ProductID_AfterUpdate() property.
Up to this point, I'm quite pleased with how I've done!
Then, I thought, suppose part way through filling in the order, I want to cancel it! No hassle, just use the command button wizard to create an 'Undo' button (which works just fine) and I've got a neat sorting out of that record.
But... (That dreaded word)...
The decremented stock level stays decremented and my inventory won't balance.
So, is there a way that when I click the main Form 'Undo' that I can 'Undo' the things that were done in the subForm? Is there a simple (and I mean simple) way to put back those stock items?
My vb and coding skills are limited; but I'll try!
TIA
Chris
*************************************
OK, I'm stoopid. But I'm good at it!
*************************************