If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
A calculated field in access
I need an Expression to extend the purchase date to a warranty expiration
date based on a product type -- Thanks !Candy |
#2
|
|||
|
|||
A calculated field in access
On Sun, 22 Nov 2009 20:35:01 -0800, Candy Pierce wrote:
I need an Expression to extend the purchase date to a warranty expiration date based on a product type Ummmm.... How can we help? You have not chosen to post any information about the structure of your table, where the purchase date is stored, how you intend to identify the extension... Give us a hand here please? -- John W. Vinson [MVP] |
#3
|
|||
|
|||
A calculated field in access
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 "John W. Vinson" wrote: On Sun, 22 Nov 2009 20:35:01 -0800, Candy Pierce wrote: I need an Expression to extend the purchase date to a warranty expiration date based on a product type Ummmm.... How can we help? You have not chosen to post any information about the structure of your table, where the purchase date is stored, how you intend to identify the extension... Give us a hand here please? -- John W. Vinson [MVP] . |
#4
|
|||
|
|||
A calculated field in access
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" wrote: 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 "John W. Vinson" wrote: On Sun, 22 Nov 2009 20:35:01 -0800, Candy Pierce wrote: I need an Expression to extend the purchase date to a warranty expiration date based on a product type Ummmm.... How can we help? You have not chosen to post any information about the structure of your table, where the purchase date is stored, how you intend to identify the extension... Give us a hand here please? -- John W. Vinson [MVP] . |
#5
|
|||
|
|||
A calculated field in access
On Mon, 23 Nov 2009 03:20:01 -0800, Candy Pierce wrote:
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. Sorry, this appears to be YOUR homework, not mine. -- John W. Vinson [MVP] |
#6
|
|||
|
|||
A calculated field in access
Thanks!
-- Candy Pierce "John W. Vinson" wrote: On Mon, 23 Nov 2009 03:20:01 -0800, Candy Pierce wrote: 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. Sorry, this appears to be YOUR homework, not mine. -- John W. Vinson [MVP] . |
#7
|
|||
|
|||
A calculated field in access
I had tried to used the IIF and the DateSerial, but I could not get it to
work .After seeing this Expression. I now know that I had one to many )))), I removed one) and now it works fine. Thank you! -- Candy Pierce "KARL DEWEY" wrote: 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" wrote: 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 "John W. Vinson" wrote: On Sun, 22 Nov 2009 20:35:01 -0800, Candy Pierce wrote: I need an Expression to extend the purchase date to a warranty expiration date based on a product type Ummmm.... How can we help? You have not chosen to post any information about the structure of your table, where the purchase date is stored, how you intend to identify the extension... Give us a hand here please? -- John W. Vinson [MVP] . |
#8
|
|||
|
|||
A calculated field in access
-- Candy Pierce "Candy Pierce" wrote: Here is the problem that I am working on in access: 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 "John W. Vinson" wrote: On Sun, 22 Nov 2009 20:35:01 -0800, Candy Pierce wrote: I need an Expression to extend the purchase date to a warranty expiration date based on a product type Ummmm.... How can we help? You have not chosen to post any information about the structure of your table, where the purchase date is stored, how you intend to identify the extension... Give us a hand here please? -- John W. Vinson [MVP] . |
#9
|
|||
|
|||
A calculated field in access
Dude dont be such a punk and help out
"John W. Vinson" wrote: On Mon, 23 Nov 2009 03:20:01 -0800, Candy Pierce wrote: 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. Sorry, this appears to be YOUR homework, not mine. -- John W. Vinson [MVP] . |
Thread Tools | |
Display Modes | |
|
|