C
Carrie
I'm not sure if this is even possible.
I will have Frm_Main (from Tbl_MAIN), Subfrm_D13_Main (Tbl_D13_MAIN;
one-to-many relationship with Tbl_MAIN) and Subfrm_D13_Inspection
(Tbl_D13_Inspect; one-to-many w/ Tbl_D13_MAIN).
In Tbl_D13_MAIN, there is a field Action with 3 options (Abandon,
Reactivate, Suspend). Each action requires an inspection but if Suspend is
selected then the inspection must be repeated on a certain frequency based on
other fields (Risk_Level, Risk_Type and Downhole_Option). Here's some
examples:
If Risk_Level = LOW and Risk_Type = Type 1 then Inspection_Frequency = 5 years
If Risk_Level = LOW and Risk_Type = Type 5 then Inspection_Frequency = 1 year
If Risk_Level = MEDIUM and Downhole_Option = Option 1 then
Inspection_Frequency = 3 years
I am currently trying to figure out how to write this into a nested IF
statement. After I finally figure that out, what I think I need the database
to do is look at the Inspection_Date that has been entered and based on the
Inspection_Frequency create a new record in Tbl_D13_Inspect with a new
Inspection_Due_Date so:
Inspection_Date + Inspection_Frequency = Inspection_Due_Date
Is this even possible or proper? Or would it be better to make the next
Inspection_Due_Date a part of the current Inspection record and just create a
new record when the next Inspection is completed?
Thanks!!!!
I will have Frm_Main (from Tbl_MAIN), Subfrm_D13_Main (Tbl_D13_MAIN;
one-to-many relationship with Tbl_MAIN) and Subfrm_D13_Inspection
(Tbl_D13_Inspect; one-to-many w/ Tbl_D13_MAIN).
In Tbl_D13_MAIN, there is a field Action with 3 options (Abandon,
Reactivate, Suspend). Each action requires an inspection but if Suspend is
selected then the inspection must be repeated on a certain frequency based on
other fields (Risk_Level, Risk_Type and Downhole_Option). Here's some
examples:
If Risk_Level = LOW and Risk_Type = Type 1 then Inspection_Frequency = 5 years
If Risk_Level = LOW and Risk_Type = Type 5 then Inspection_Frequency = 1 year
If Risk_Level = MEDIUM and Downhole_Option = Option 1 then
Inspection_Frequency = 3 years
I am currently trying to figure out how to write this into a nested IF
statement. After I finally figure that out, what I think I need the database
to do is look at the Inspection_Date that has been entered and based on the
Inspection_Frequency create a new record in Tbl_D13_Inspect with a new
Inspection_Due_Date so:
Inspection_Date + Inspection_Frequency = Inspection_Due_Date
Is this even possible or proper? Or would it be better to make the next
Inspection_Due_Date a part of the current Inspection record and just create a
new record when the next Inspection is completed?
Thanks!!!!