Parameter query

  • Thread starter Thread starter Denielle
  • Start date Start date
D

Denielle

I have a db that contains Procedure codes and pricing. A
procedure code can be listed multiple times with a
different price.

I want to create a query that prompts to enter the
procedure codes and the related price. More than 1
procedure code will be specified.

Example: List procedure code 111 where the price is $5.00
and procedure code 222 where the price is $7.00 and
procedure code 333 where the price is $9.00, etc.

I have a parameter query setup (using an IN statement) to
prompt for the procedure codes but now I need to know how
to specify the price for each of those codes.

Any thoughts??

Thank you in advance.
 
Hi,

Put the pairs in a (temporary) table:


NewPrices
ListCode, NewPrice
111 5.00
222 7.00
333 9.00


then, update with a query: Bring both tables, the one to be updated,
Prices, and the new one, NewPrices. Drag and drop ListCode from Prices to
NewPrices, edit the link, make it a type 3 ( keep all records from
NewPrices). Bring, from Prices, the table to be updated, fields ListCode
and Price. Update them with [NewPrices].[ListCode] and
[NewPrices].[NewPrice]. That's all.


Free, as extra, since NewPrices can be filled though a form, it is less
"error prone", less stressing, than having to enter a long sequence of
numbers, as parameters, without making some mistake.



Hoping it may help,
Vanderghast, Access MVP
 
Back
Top