Dear All,
Thanks for a great forum!
Within the query I have below there is a field DaysGone that is a calculation field.
DaysGone = Todays date - date application was made valid.
Then in the criteria I have: >=[forms]![MainScreen].[SrchCrit]
I have to use the VAL() function as otherwise it gives me a ODBC call failure.
It also doesn't provide the correct output.
E.G. if I put 56 in the field of SrchCrit it gives me output from 6 all the way to 8379???
Any help/advice would be greatly appreciated!
Thanks
Thank you,
Kind regards
Triacona
Thanks for a great forum!
Within the query I have below there is a field DaysGone that is a calculation field.
DaysGone = Todays date - date application was made valid.
Then in the criteria I have: >=[forms]![MainScreen].[SrchCrit]
I have to use the VAL() function as otherwise it gives me a ODBC call failure.
It also doesn't provide the correct output.
E.G. if I put 56 in the field of SrchCrit it gives me output from 6 all the way to 8379???
Code:
SELECT UNI7LIVE_DCAPPL.OFFCODE, Val(Date()-(UNI7LIVE_DCAPPL.DATEAPVAL)) AS DaysGone, UNI7LIVE_DCAPPL.DATEAPVAL,
UNI7LIVE_DCAPPL.DATEDECISN, UNI7LIVE_DCAPPL.REFVAL, UNI7LIVE_DCAPPL.PROPOSAL, UNI7LIVE_DCAPPL.ADDRESS, UNI7LIVE_DCAPPL.DATE8WEEK,
UNI7LIVE_DCAPPL.DATEAPRECV, UNI7LIVE_DCAPPL.DCSTAT, UNI7LIVE_DCAPPL.DCAPPTYP, UNI7LIVE_DCAPPL.DECTYPE, UNI7LIVE_DCAPPL.DATEDECISS, (Date()-UNi7LIVE_DCAPPL.DATEAPVAL) AS DaysGoneT
FROM UNI7LIVE_DCAPPL
GROUP BY UNI7LIVE_DCAPPL.OFFCODE, Val(Date()-(UNI7LIVE_DCAPPL.DATEAPVAL)), UNI7LIVE_DCAPPL.DATEAPVAL, UNI7LIVE_DCAPPL.DATEDECISN,
UNI7LIVE_DCAPPL.REFVAL, UNI7LIVE_DCAPPL.PROPOSAL, UNI7LIVE_DCAPPL.ADDRESS, UNI7LIVE_DCAPPL.DATE8WEEK, UNI7LIVE_DCAPPL.DATEAPRECV,
UNI7LIVE_DCAPPL.DCSTAT, UNI7LIVE_DCAPPL.DCAPPTYP, UNI7LIVE_DCAPPL.DECTYPE, UNI7LIVE_DCAPPL.DATEDECISS
HAVING (((UNI7LIVE_DCAPPL.OFFCODE) Like "*" & [Forms]![MainScreen].[CmbOff] & "*") AND ((Val(Date()-(UNI7LIVE_DCAPPL.DATEAPVAL)))>=[forms]![MainScreen].[SrchCrit]) AND
((UNI7LIVE_DCAPPL.DATEAPVAL) Is Not Null) AND ((UNI7LIVE_DCAPPL.DCSTAT) Not In ("NFA","PD","WDN","PPREQ","PDREM","PREAPP","COMP","PDE","CLO"))
AND ((UNI7LIVE_DCAPPL.DATEDECISS) Is Null))
ORDER BY Val(Date()-(UNI7LIVE_DCAPPL.DATEAPVAL));
Any help/advice would be greatly appreciated!
Thanks
Thank you,
Kind regards
Triacona