I would like to be able to have a select list where I can change the variable in : ((Accreditation.Expires) Between Date()+150 And Date()+91));
I can make the list easy enough.
Days until expiration List:
Days Start Stop
30 0 30
60 31 60
90 61 90
120 91................and so forth
150
180
How would I set it up to make the list activate in the below query? Insert Column 2 into the Date()+ and Column 3 into the end date.
Or do I need to have some sort of stop and start column in the query?
Code:
SELECT Field.Field_ID, Field.Field_Name, System.[System Name], Nomenclature.Nomenclature, Component.Component, Version.Version, Accreditation.[ACC_#], Accreditation.Type_ACC, Accreditation.Accred, Accreditation.Expires, Accreditation.Compliance, Main.Hold, Accreditation.FD_Compliant
FROM Version RIGHT JOIN (System RIGHT JOIN (Nomenclature INNER JOIN (Field INNER JOIN (Component INNER JOIN (Accreditation INNER JOIN Main ON Accreditation.Accred_ID = Main.[ACC_#]) ON Component.Comp_ID = Main.Comp_ID) ON Field.Field_ID = Main.Field_ID) ON Nomenclature.Nomen_ID = Main.Nomen_ID) ON System.SYS_ID = Main.SYS_ID) ON Version.Vers_ID = Main.Vers_ID
WHERE (((Field.Field_ID)<>15) AND ((System.[System Name])<>"Tactical Systems") AND ((Accreditation.Expires) Between Date()+150 And Date()+91));
Thanks