Calc Control in an update query

S

SAC

Acc 2000

I'm trying to use a calculated control in an update query.

I have PriceEa in a column, then I have an alias such as NewPrice: PriceEa *
1.10

Then I would like to update PriceEa with NewPrice, but it keeps asking me
for the NewPrice Parameter.

Any ideas?

Thanks.
 
D

Dirk Goldgar

SAC said:
Acc 2000

I'm trying to use a calculated control in an update query.

I have PriceEa in a column, then I have an alias such as NewPrice:
PriceEa *
1.10

Please pardon a terminological quibble: that would be a calculated
field, not a calculated control.
Then I would like to update PriceEa with NewPrice, but it keeps
asking me for the NewPrice Parameter.

Any ideas?

Just use the expression itself, not the caculated field, in the "Update
To:" row of the query design grid:

Update To: [PriceEa] * 1.10

You really don't need to show the calculated NewPrice field at all. In
SQL, the query would look like this:

UPDATE <your table name>
SET PriceEa = PriceEa * 1.10;
 

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