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

G

Guest

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
 
G

Guest

Ok, it sounds like you're not talking about modifying the stock value
directly, but rather just adding some number to the existing value. In that
case, assuming that the stock value is part of the same table that your form
is based on, I would think that you'd just need to write a couple lines of
code that would take the value that the user entered and add it to the
existing stock value, and then change the existing stock value to the total
of the two.

Now if the stock value is not part of the recordset that the form is based
on, then you would need to run an update query to add the number that the
user entered to the number in the table for the proper record containing the
stock value for the item that the user is viewing.

Not sure if that's much help, but some more details on how your form is set
up and what info it is based on would help to solve the problem better.
 

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