hardik_088
Registered User.
- Local time
- Today, 13:17
- Joined
- May 31, 2011
- Messages
- 82
Hi ,
I have Form OrderLaptops and table laptops. I have fields in Laptops table like Description,[quantity ordered],Location,Department,Part number etc....
and Description is a Primary Key so you cann't enter same data.
i made button in the OrderLaptops form and in click event i write update query.
button click event Code is here
DoCmd.RunSQL "UPDATE Laptops SET Laptops.[quantity ordered] = Laptops.[quantity ordered] + Forms!OrderLaptops![Quantity Ordered] WHERE Laptops.Description = Forms!OrderLaptops.Description"
I want that if i write anything in form OrderLaptops it should add data in laptop table but if same record exist then it should update record.
Suppose I have Laptop 3(Quantity Ordered), HR(department),Canada(Location),HP(Description) then it should add new record in table and if I have that record exist in table then it should just add quantity so there should be quantity is 6 and every thing is same.
So how can i do in access 2007?
Thank you very very much
I have Form OrderLaptops and table laptops. I have fields in Laptops table like Description,[quantity ordered],Location,Department,Part number etc....
and Description is a Primary Key so you cann't enter same data.
i made button in the OrderLaptops form and in click event i write update query.
button click event Code is here
DoCmd.RunSQL "UPDATE Laptops SET Laptops.[quantity ordered] = Laptops.[quantity ordered] + Forms!OrderLaptops![Quantity Ordered] WHERE Laptops.Description = Forms!OrderLaptops.Description"
I want that if i write anything in form OrderLaptops it should add data in laptop table but if same record exist then it should update record.
Suppose I have Laptop 3(Quantity Ordered), HR(department),Canada(Location),HP(Description) then it should add new record in table and if I have that record exist in table then it should just add quantity so there should be quantity is 6 and every thing is same.
So how can i do in access 2007?
Thank you very very much