Updating a third table

J

Joyce

Hi, I have learned how to successfully add, modify and update both
tables in a master/detail form such as Customers and Orders.

What I am having trouble with now is how to update the Qty field in a
third table, Products, as we add lines to the child form. That is each
row should subtract the qty amount from that item in the Products
table.

Any suggestions or articles to point to?

Thanks,
--Joyce Perry
 
W

William \(Bill\) Vaughn

Generally, most approach this problem with a SP. This deals with the entire
"update" issue--dealing with several tables in a single operation.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
W

W.G. Ryan - MVP

Joyce said:
Hi, I have learned how to successfully add, modify and update both
tables in a master/detail form such as Customers and Orders.

What I am having trouble with now is how to update the Qty field in a
third table, Products, as we add lines to the child form. That is each
row should subtract the qty amount from that item in the Products
table.

Any suggestions or articles to point to?

--Joyce, one thing you can do is use the Expression property of the
dataColumn in the child/grandchild table to have it computed on the fly.
This has the benefit of being more performant and updating the value whenver
anything is changed locally. This should help
http://www.knowdotnet.com/articles/expressions.html
http://msdn.microsoft.com/library/d...fsystemdatadatacolumnclassexpressiontopic.asp
 
J

Joyce

William, thank you so much! The Expression property is exactly what I
was looking for, and your articles - fantastic!
--Joyce Perry
 

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