Add button in Inventory

  • Thread starter Syphonics via AccessMonster.com
  • Start date
S

Syphonics via AccessMonster.com

Hi Guys, i have a problem adding my inventory.
I have a table call the "product"
Inside the product table i had a field call "UnitsInStock"
I wanted a textbox in the form to allow the user to key in the number of
quanity that is going to be added. once the number is key in, the user will
click on a add button to have the values added to the "UnitsInStock"
THanks for the help. :)
 
G

Guest

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
 
S

Syphonics via AccessMonster.com

but i need a button to add the amount, hence after adding the values in the
textbox is gone.
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. :)
 
G

Guest

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 said:
but i need a button to add the amount, hence after adding the values in the
textbox is gone.
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. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top