Update Query

G

Guest

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....
 
G

Guest

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

KARL DEWEY said:
Your criteria is confusing to me. What field is the criteria for?

Foty said:
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....
 
G

Guest

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

KARL DEWEY said:
Your criteria is confusing to me. What field is the criteria for?

Foty said:
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....
 
G

Guest

The field is "quantity". I'm trying to take an entered "quantity", then take
that entered value and subtract from the table products field units on hand.

Thanks so much for your help...

KARL DEWEY said:
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

KARL DEWEY said:
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....
 
G

Guest

Post your SQL statement by opening the query in design view and clicking on
menu VIEW - SQL View. Highlight the SQL, copy and post.

Foty said:
The field is "quantity". I'm trying to take an entered "quantity", then take
that entered value and subtract from the table products field units on hand.

Thanks so much for your help...

KARL DEWEY said:
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....
 
G

Guest

UPDATE Products SET Products.UnitsOnHand =
"UnitsOnHand-Forms![Orders]![Order Details Subform].Form!Quantity"
WHERE (((Products.ProductID)=[Forms]![Orders]![Order Details
Subform].[Form]![ProductID]));

I really appreciate your help!!!!!

KARL DEWEY said:
Post your SQL statement by opening the query in design view and clicking on
menu VIEW - SQL View. Highlight the SQL, copy and post.

Foty said:
The field is "quantity". I'm trying to take an entered "quantity", then take
that entered value and subtract from the table products field units on hand.

Thanks so much for your help...

KARL DEWEY said:
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.

:


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....
 

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