C
Candy Pierce
I need an Expression to extend the purchase date to a warranty expiration
date based on a product type
date based on a product type
I need an Expression to extend the purchase date to a warranty expiration
date based on a product type
Create a Select Query with Calculations
Standard operating procedure for purchasing desktop and notebook computers
is to buy three-year extended next-business-day warranties for notebooks and
two-year next-business-day warranties for all desktops. The warranty
effective dates are the purchase dates. You want to calculate the warranty
expiration dates for the computers in the Hardware table.
John W. Vinson said:Sorry, this appears to be YOUR homework, not mine.
KARL DEWEY said:Why not use DateAdd and IIF like this --
Expiration: DateAdd("yyyy", IIF([ProductType] = "DeskTop", 2, 3),
[PurchaseDate])
--
Build a little, test a little.
Candy Pierce said:Here is the problem that I am working on in access:
Create a Select Query with Calculations
Standard operating procedure for purchasing desktop and notebook computers
is to buy three-year extended next-business-day warranties for notebooks and
two-year next-business-day warranties for all desktops. The warranty
effective dates are the purchase dates. You want to calculate the warranty
expiration dates for the computers in the Hardware table.
• Create a query on the Hardware table named WarrantyExpiration with asset
tag, product type, purchase date, and employee ID.
• Create a calculated field to extend the purchase date to a warranty
expiration date based on product type.
• Return the results in a column named Warranty Expiration. Sort by nearest
expiration dates.
• Run and save the query
I created a query on the Hardware Table named WarrantyExpiration with asset
tag, product type, purchase date, employee ID. I created a calculated field
to extend the purchase date to a warranty expiration date based on th product
type. I used the IIf function and the Dateserial in the Builder to get my
expression. The DateSerial works good, until, I try to use the IIf to
associate it with the ProductType: "Desktop" Or "Notebook/tablet",
Candy Pierce said:Here is the problem that I am working on in access:
John W. Vinson said:Sorry, this appears to be YOUR homework, not mine.
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.