You did not answer the question - What field is the criteria for?
You came back with another criteria.
Criteria in a query compares to the data in the field it is associated with.
If you have criteria of quanity for a Quanity field then your results would
be all records that have that value in the field.
It seems like you want to display the difference between on-hand quanity and
the value you enter. If this is what you want then in design view of the
query add a field like this --
New Balance: [YourOn-HandField] - [Forms]![YourFormName]![YourTexboxName]
You might want another criteria for your ProductID so you pull a limited
number of records.
Foty said:
I'm trying to take the quantity entered on the order details subform, and
subtract it from my units on hand. Works the same if I use the following
criteria
[Forms]![Order Details Subform].[Form]![ProductID]
This works, but instead of doing the calulation when entered I get to the
end of the form, then pops up with parameter values boxes. If I enter the
correct data it then takes away from units on hand. I want it to not pop up
the parameter value boxes. Hope this makes more sense....
Thanks Shawn
:
Your criteria is confusing to me. What field is the criteria for?
:
I'm trying to update units on hand from a order db. Here are my query
parameters. Everytime it's run I get parameter value boxes show up. Am I
missing something???
Criteria:[Forms]![Orders by Customer]![Orders]![Order Details
Subform].[Quantity]
Update to:[UnitsOnHand]-Forms![Orders by Customer]!Orders![Order Details
Subform]!Quantity
If anyone could help I would greatly appreciate it....