Complicated if then date calculated control

TLJ

Registered User.
Local time
Today, 03:04
Joined
Aug 17, 2003
Messages
31
Hello,

I hope the following will explain my dilema. I want to have a calculated control on my form to provide an event date in the future. I already have two types of events that I project a "next event" by using update queries ran by a macro button on the form for updating.

Heres the flow of what I need.

If c = 1 then e = d + 90 days, If c = 2 then e = d +180 days, If c = 3 then e = d + 365 days, If c= 4 then e = N/A

C is a list box control
d is a date field
e is a date field

It is actually a little more complicated as C has 14 choices

Prob High
Prob Mod
Prob Low
Prob Admin
All "Highs" = example 1
Par High
Par Mod
Par Low
Par Admin
All "Mods" = example 2
IS Prob High
IS Prob Mod
IS Prob Low
All "Lows" = example 3
IS Par High
IS Par Mod
IS Par Low
Both admin values = example 4

This may sound silly, but I want the fields to also post to my main table as I export this to EXCEL to store on my PDA

My update query to do a simple date + 6 months is

field : Next Ass'd
table: clients
update to: DateAdd("m",+6,[Last Ass'd])

I don't know the syntax to add the If thens. I am guessing that I may need to add a code table to update the "C" field to make it into only 4 choices as my guess is that 14 is way to complictated.

Thanks TJ
 
Perhaps I should have posted this in the queries forum as I am guessing I really want to write an expression for an update query.
 

Users who are viewing this thread

Back
Top Bottom