Hello,
I would truely appreciate it if I could have some input with this issue.
I have an access query, I am trying to get it to filter the results based on the date input that pops up when the query is run.
Currently when I run it with the relevant dates entered nothing is returned.
Thank you all so much
I would truely appreciate it if I could have some input with this issue.
I have an access query, I am trying to get it to filter the results based on the date input that pops up when the query is run.
Currently when I run it with the relevant dates entered nothing is returned.
Code:
SELECT AP.QN, GI.SN,
AP.AT, AP.PE,
GI.TR, AP.RP,
GI.CT,
Max(IIf(Len(NZ([PDT],0))=1,
Null,CDate(IIf(Len([PDT])=5,
Left(CStr([PDT]),1),Left(CStr([PDT]),2))
& "/" & Left(Right(CStr([PDT]),4),2)
& "/" & Right(CStr([PDT]),2))))
AS [AP DATE],
Max(IIf(Len(NZ([ATO],0))=1,Null,
CDate(IIf(Len([ATO])=5,
Left(CStr([ATO]),1),Left(CStr([ATO]),2))
& "/" & Left(Right(CStr([ATO]),4),2)
& "/" & Right(CStr([ATO]),2))))
AS [FD DATE], [LN - NAME].COR
FROM (GI
INNER JOIN AP
ON GI.NO = AP.QN)
INNER JOIN [LN - NAME]
ON GI.SN = [LN - NAME].SNM
GROUP BY AP.QN, GI.SN,
AP.AT, AP.PE,
GI.TR, AP.RP,
GI.CT, [LN - NAME].COR
HAVING (((Max(IIf(Len(NZ([PDT],0))=1,
Null,CDate(IIf(Len([PDT])=5,
Left(CStr([PDT]),1),
Left(CStr([PDT]),2)) & "/"
& Left(Right(CStr([PDT]),4),2)
& "/" & Right(CStr([PDT]),2)))))=
[START MM/DD/YYYY])
AND ((Max(IIf(Len(NZ([ATO],0))=1,Null,
CDate(IIf(Len([ATO])=5,
Left(CStr([ATO]),1),Left(CStr([ATO]),2))
& "/" & Left(Right(CStr([ATO]),4),2)
& "/" & Right(CStr([ATO]),2)))))=
[END MM/DD/YYYY]))
ORDER BY Max(IIf(Len(NZ([PDT],0))=1,
Null,CDate(IIf(Len([PDT])=5,
Left(CStr([PDT]),1),
Left(CStr([PDT]),2)) & "/" &
Left(Right(CStr([PDT]),4),2)
& "/" & Right(CStr([PDT]),2))))
Comment