EclecticBob
asked on
Ms Access SQL not updating when form is open
I have form that prints an Invoice. When the invoice is printed it updates the inventory table to adjust for the number of items sold. I do this with the following statement.
DoCmd.RunSQL "UPDATE tblInvoiceDetail INNER JOIN tblInventoryData ON " _
& "tblInvoiceDetail.Partno = tblInventoryData.Partno SET " _
& " tblInventoryData.QuanInSto ck = [tblInventoryData].[QuanIn Stock]-[tb lInvoiceDe tail].[Ord erQuan] " _
& "WHERE (((tblInvoiceDetail.[InvNo ])=" & InvNo & ") AND ((tblInventoryData.DropShi p)<>-1));"
This works perfectly but if my Inventory form is also open to one fo the items being updated, the update for that item does not occur. What can I do to fix this?
DoCmd.RunSQL "UPDATE tblInvoiceDetail INNER JOIN tblInventoryData ON " _
& "tblInvoiceDetail.Partno = tblInventoryData.Partno SET " _
& " tblInventoryData.QuanInSto
& "WHERE (((tblInvoiceDetail.[InvNo
This works perfectly but if my Inventory form is also open to one fo the items being updated, the update for that item does not occur. What can I do to fix this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER