D
Damon Heron
I have the following code to check inventory of product after quantity is
input in subform:
Dim OnHand As Long
Dim PID As Integer
Dim LID As Integer
PID = Me![ProductID]
LID = Me![LocationID]
OnHand = DSum("(nz([UnitsReceived])-nz([UnitsRemoved]))", "[Inventory
Transactions]", "[ProductID]=" & PID)
This works, gives me the total quantity of the product but in all
Locations.... I tried adding the following to the criteria:
AND [LocationID]='LID' ")
in hopes of getting just the quantity at the particular location,
but am getting a type mismatch error. Tried various quotes, apostrophes,
can't get it to work... Is it possible? The examples in Access help don't
address my circumstance too well.
Thanks in advance for any suggestions!!
Damon
input in subform:
Dim OnHand As Long
Dim PID As Integer
Dim LID As Integer
PID = Me![ProductID]
LID = Me![LocationID]
OnHand = DSum("(nz([UnitsReceived])-nz([UnitsRemoved]))", "[Inventory
Transactions]", "[ProductID]=" & PID)
This works, gives me the total quantity of the product but in all
Locations.... I tried adding the following to the criteria:
AND [LocationID]='LID' ")
in hopes of getting just the quantity at the particular location,
but am getting a type mismatch error. Tried various quotes, apostrophes,
can't get it to work... Is it possible? The examples in Access help don't
address my circumstance too well.
Thanks in advance for any suggestions!!
Damon