B
Beccy Howard
I have the following calculation within a module:
Dim wait As Database, wl As Recordset, prov As Recordset
Set wait = DBEngine.Workspaces(0).Databases(0)
Set opwl = wait.OpenRecordset("OP WL Test")
opwl![WAIT_DUR] = DateDiff("d", Nz(opwl![U_DNA], opwl!
[U_Ref_Date]), opwl![U_Census_Date])
This returns a wait duration in days. How can I add the
following criteria to the calculation? Where U_DNA is
greater than the U_Census_date then ignore U_DNA date and
calcuate wait duration U_Ref_Date - U_Census_date. If the
U_DNA is not higher than the U_Census_date then use the
formula above.
Dim wait As Database, wl As Recordset, prov As Recordset
Set wait = DBEngine.Workspaces(0).Databases(0)
Set opwl = wait.OpenRecordset("OP WL Test")
opwl![WAIT_DUR] = DateDiff("d", Nz(opwl![U_DNA], opwl!
[U_Ref_Date]), opwl![U_Census_Date])
This returns a wait duration in days. How can I add the
following criteria to the calculation? Where U_DNA is
greater than the U_Census_date then ignore U_DNA date and
calcuate wait duration U_Ref_Date - U_Census_date. If the
U_DNA is not higher than the U_Census_date then use the
formula above.