Producing a new date depending on a figure

P

Paul T

I need to make a query which will update a second date field in a main table.
for example The date an order was origanaly taken + 14 days if a customers
fee is £50
so date order taken is 11/11/05 the re call date would need to be 25/11/05

ii the order is £100 re check date needs to be 31 days after origanal order
date.

Any ideas or suggestions would be greatly appreciated
 
D

David Lloyd

Paul:

The following UPDATE query is one alternative for accomplishing something
like this:

UPDATE MyTable
SET MyTable.SecondDate =
IIf([FeeField]=50,DateAdd("d",[OrderDate],14),IIf([FeeField]=100,DateAdd("d",[OrderDate],31),Date()));

In this example, I defaulted the second date to the current date if the fee
is not 50 or 100. You can adjust this to your needs. The above query will
update all records. If you want to update only a subset of records, use an
appropriate WHERE clause.

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


I need to make a query which will update a second date field in a main
table.
for example The date an order was origanaly taken + 14 days if a customers
fee is £50
so date order taken is 11/11/05 the re call date would need to be 25/11/05

ii the order is £100 re check date needs to be 31 days after origanal order
date.

Any ideas or suggestions would be greatly appreciated
 
Top