Hi there, I have this code in my form_dirty event,
Basically I want this to look in the table 'Products' for any value that has the same 'OrderID' as the current 'OrderID' on the form and then multiply 'Price Each' and 'Quantity' and sum the values together.
All that happens is the form hangs for around 2 seconds as if trying to work something out and then returns nothing to price.value.
It's probably me being stupid and I've used the wrong syntax or something, but I can't seem to notice what I'm doing wrong.
Any help would be appreciated
.
James Prince
Code:
Price.Value = DSum("[Price Each] * [Quantity]", "[Products]", "[OrderID] = " & Form_Orders.OrderID.Value)
Basically I want this to look in the table 'Products' for any value that has the same 'OrderID' as the current 'OrderID' on the form and then multiply 'Price Each' and 'Quantity' and sum the values together.
All that happens is the form hangs for around 2 seconds as if trying to work something out and then returns nothing to price.value.
It's probably me being stupid and I've used the wrong syntax or something, but I can't seem to notice what I'm doing wrong.
Any help would be appreciated

James Prince
Last edited: