how to edit the database..

hi all..

thanks PremalathaP.. actually, i want to add/minus data in my field in my database in access.. for example..

field1(Item)..............field2(Quantity)
Item1.....................5
Item2.....................8
Item3.....................9
Item4.....................3

for the example above, in my database in access there is a table with 2 field that is field1(Item) and field2(Quantity) where the datatype for field2 is in number. so how can i add/minus in field2 for example in row1 field2, i want to add the data make it 6 and the table like below..

field1(Item)..............field2(Quantity)
Item1.....................6
Item2.....................8
Item3.....................9
Item4.....................3

can someone please help me..
[818 byte] By [areon25] at [2007-11-19 22:55:17]
# 1 Re: how to edit the database..
UPDATE 'MyTable'
SET [Field2] = [Field2] + 1
WHERE [Field1] = 'Item1'

Hope that helps
Sabin_33 at 2007-11-9 13:43:46 >
# 2 Re: how to edit the database..
hi all...

thanks sabin for the code.. it's works.. but this time i want to use the input box for entering the number that we want to add in the database. in my form, there are one button 'Search' to search data in database. and datagrid for display my database. the problem is, how i can identify the itemXX related to your example?? i hope u'll understand..

can someone please help me??
areon25 at 2007-11-9 13:44:46 >
# 3 Re: how to edit the database..
hi all..

i have a problem to edit the database. i've attached some sample about edit the database. can someone please help me.. i hope everyone who see my sample will understand what i'm doing..

thanks
areon25 at 2007-11-9 13:45:56 >