Compute a field depending on an effective date

kilou

Registered User.
Local time
Today, 08:16
Joined
Aug 10, 2008
Messages
20
Hi,

here's one of my many Access problem as a newbie :) I have large list of batch information in a table, like batch manufacturing date and the date of batch release. Now I have another table which stores target release time with effective date. This means that for example in 2006 the batch should get released in 14 days (release date-manufacturing date) and this target must be able to move in the future.

So I'd like to build a query based on these 2 tables (batch info and target release time) which would add a column named TargetRelease for each batch. The target release would be displayed depending on the effective date. If the release date of batch1 is more recent than the last effective date, it would get the current target release. For an older release date, the target release would be deduced from the effective date which applies for this release date and so on.

Could anyone help me to design the target release table and the query to do that?

Thanks
 
Looks like you would use the IIf() and DateDiff() functions in your Query through a calculated Field (realtime) and use that query as the base of your form.

Hi,

here's one of my many Access problem as a newbie :) I have large list of batch information in a table, like batch manufacturing date and the date of batch release. Now I have another table which stores target release time with effective date. This means that for example in 2006 the batch should get released in 14 days (release date-manufacturing date) and this target must be able to move in the future.

So I'd like to build a query based on these 2 tables (batch info and target release time) which would add a column named TargetRelease for each batch. The target release would be displayed depending on the effective date. If the release date of batch1 is more recent than the last effective date, it would get the current target release. For an older release date, the target release would be deduced from the effective date which applies for this release date and so on.

Could anyone help me to design the target release table and the query to do that?

Thanks
 

Users who are viewing this thread

Back
Top Bottom