Best way to accomplish this...

  • Thread starter hotrod1952 via AccessMonster.com
  • Start date
H

hotrod1952 via AccessMonster.com

I have an existing database which I do not want to change the table design of.

I have written the following query:
SELECT WO.WOID, WO.DateCreated, WODefSchedule.Interval, IntervalType.
IntervalType, [IntervalType]![Days]*[WODefSchedule]![Interval] AS Expr1
FROM (WO INNER JOIN WODefSchedule ON WO.WONo = WODefSchedule.WONo) INNER JOIN
IntervalType ON WODefSchedule.IntervalType = IntervalType.IntervalType
WHERE (((WO.WOStatusNo)=0) AND ((WO.WODefNo) Is Not Null));

This query gives me the woid,date created,Interval, & Intervaltype.
Example data:
37612,3/12/2007,4,2,120
This data is interpreted as: WO#,Date Created,4,Monthly,4*30=120

What I need to do is take this expression result and do a lookup someplace
(NewTable?) and:
FLD1 FLD2
0 7
13 10
29 20
59 30
119 40
179 60

The expression value of 120 is <179 so it would return the value 60 which I
would like added to the created date and write that value into another tables
value which would become the due date.

Ideas?
 

Ask a Question

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.

Ask a Question

Top