A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

A calculated field in access



 
 
Thread Tools Display Modes
  #1  
Old November 23rd, 2009, 04:35 AM posted to microsoft.public.access.queries
Candy Pierce
external usenet poster
 
Posts: 5
Default 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  
Old November 23rd, 2009, 05:40 AM posted to microsoft.public.access.queries
John W. Vinson
external usenet poster
 
Posts: 18,261
Default 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  
Old November 23rd, 2009, 11:20 AM posted to microsoft.public.access.queries
Candy Pierce
external usenet poster
 
Posts: 5
Default 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  
Old November 23rd, 2009, 03:41 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default 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  
Old November 23rd, 2009, 05:08 PM posted to microsoft.public.access.queries
John W. Vinson
external usenet poster
 
Posts: 18,261
Default 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  
Old November 24th, 2009, 12:10 AM posted to microsoft.public.access.queries
Candy Pierce
external usenet poster
 
Posts: 5
Default 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  
Old November 24th, 2009, 12:18 AM posted to microsoft.public.access.queries
Candy Pierce
external usenet poster
 
Posts: 5
Default 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  
Old November 24th, 2009, 12:22 AM posted to microsoft.public.access.queries
Candy Pierce
external usenet poster
 
Posts: 5
Default 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  
Old December 10th, 2009, 03:41 AM posted to microsoft.public.access.queries
Joe N
external usenet poster
 
Posts: 1
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:54 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.