How can I add to an existing field in a table?

C

Chris

I am trying to create a little inventory system and I am very new to access.
I have been able to create a form that will read in a scanned barcode and
display the accompanying data about that item. Now I want to make it where
the user can put a number in a text box hit a button and add that number to
the existing number in the table showing the number of that item in stock.
How can I do this?

Chris
 
F

fredg

I am trying to create a little inventory system and I am very new to access.
I have been able to create a form that will read in a scanned barcode and
display the accompanying data about that item. Now I want to make it where
the user can put a number in a text box hit a button and add that number to
the existing number in the table showing the number of that item in stock.
How can I do this?

Chris

Include the Quantity field on the form.
Set the [Quantity].Enabled property to False.

Add an unbound text control to the form.
Name it "AddQty"
Code it's AfterUpdate event:
Me![Quantity] = Nz(Me![Quantity]) + Nz(Me![AddQty]))

Always enter data into the [AddQuty] control.
 
Top