I don't understand what you are saying. If you have a text box for UnitsInStock, it will contain whatever the current value in the table field is until you add to it.
If you have another text box on your form to enter the UnitsToAdd, it will retain its value until you close the form or change it. It will be an unbound text box, so it will not be gone.
The only difference between doing it in the After Update event of the unbound UnitsToadd text and with a command button is where you put the code. It will be the same wherever you put it. If you use a command button, put the same code in the click event.
The advantage of the text box is that once the user enters a value, it immediately gets added. If you use a command button, than means the user may forget it. It also requires two operations for the user instead of one.
"Syphonics via AccessMonster.com" wrote:
[Quoted Text] > but i need a button to add the amount, hence after adding the values in the > textbox is gone. > > Klatuu wrote: > >You need an unbound text box to enter the units to be added. That is > >assuming you are not creating an inventory transaction that will be saved > >with units to be added. You don't really need an Add button, you can just > >use the After Update event of the units to add text box to do the work: > > > > Me.txtUnitsInStock = Me.txtUnitsInStock + Me.txtUnitsTo Add > > > >> Hi Guys, i have a problem adding my inventory. > >> I have a table call the "product" > >[quoted text clipped - 3 lines] > >> click on a add button to have the values added to the "UnitsInStock" > >> THanks for the help. :) > > -- > Message posted via AccessMonster.com > http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200609/1> >
|