Hi, I'm new to MS Access and have a question about Parameter queries.
I have a "Parts" database that contains part numbers, descriptions, and prices and I'm trying to create an Update Query that will prompt the user for a part number, then prompt them for a percentage to increase or decrease a part by, then update the part price in the Parts table. But I'm having some trouble with the math and getting Access to do what I want it to do...
I'm editing the query in design view and I've entered two fields in the query, "PartNumber" and "Price" from the Parts table. I know how to prompt the user to enter a value, by using brackets [ ], but unsure how to format the percentage calculation.
So far I have this in the "Update To" Price field:
[Price]*([Enter a percentage:]%)
But keep getting an error because I'm not doing something rite...
Here is an example of what I am trying to achieve: I'd like the query to prompt the user first for the part number, then for a percentage to increase or decrease the part price by.
The prompt should say "Please enter a percentage:" then the user would enter "10" to increase the price by 10% or "-10" to decrease the price by -10%. Then the query would multiply the part price by what the user entered and update the Part table accordingly.
I'd like the prompt to be simple, E.G. rather than requiring the user to enter "1.05" to increase by 5%, just have the user enter "5" for a 5% increase.
Any help would be greatly appreciated,
Thanks!
I have a "Parts" database that contains part numbers, descriptions, and prices and I'm trying to create an Update Query that will prompt the user for a part number, then prompt them for a percentage to increase or decrease a part by, then update the part price in the Parts table. But I'm having some trouble with the math and getting Access to do what I want it to do...
I'm editing the query in design view and I've entered two fields in the query, "PartNumber" and "Price" from the Parts table. I know how to prompt the user to enter a value, by using brackets [ ], but unsure how to format the percentage calculation.
So far I have this in the "Update To" Price field:
[Price]*([Enter a percentage:]%)
But keep getting an error because I'm not doing something rite...
Here is an example of what I am trying to achieve: I'd like the query to prompt the user first for the part number, then for a percentage to increase or decrease the part price by.
The prompt should say "Please enter a percentage:" then the user would enter "10" to increase the price by 10% or "-10" to decrease the price by -10%. Then the query would multiply the part price by what the user entered and update the Part table accordingly.
I'd like the prompt to be simple, E.G. rather than requiring the user to enter "1.05" to increase by 5%, just have the user enter "5" for a 5% increase.
Any help would be greatly appreciated,
Thanks!
