B
brownti via AccessMonster.com
I have a union query shown below. I would like to add a where condition but
am having a very difficult time getting the the whole date/time to work out.
tblDelivery.TrimStart and tblDelivery.TrimFinal are Date/Time fields
formatted as "m/d/yyyy" i dont care at all about the time.
SELECT tblDelivery.UnitID, tblJobInfo.JobID, tblJobInfo.JobNumber, [Address]
& " " & [UnitNumber] & " " & [City] AS Location, tblUnitSelections.Wing,
"TrimStart" AS DeliveryDescription, tblDelivery.TrimStart AS DeliveryDate
FROM (tblJobInfo INNER JOIN tblUnitSelections ON tblJobInfo.JobID =
tblUnitSelections.JobID) INNER JOIN tblDelivery ON tblUnitSelections.UnitID =
tblDelivery.UnitID
WHERE (((tblDelivery.TrimStart) Is Not Null))
ORDER BY tblDelivery.UnitID
UNION ALL SELECT tblDelivery.UnitID, tblJobInfo.JobID, tblJobInfo.JobNumber,
[Address] & " " & [UnitNumber] & " " & [City] AS Location, tblUnitSelections.
Wing, "TrimFinal" AS DeliveryDescription, tblDelivery.TrimFinal AS
DeliveryDate
FROM (tblJobInfo INNER JOIN tblUnitSelections ON tblJobInfo.JobID =
tblUnitSelections.JobID) INNER JOIN tblDelivery ON tblUnitSelections.UnitID =
tblDelivery.UnitID
WHERE (((tblDelivery.TrimFinal) Is Not Null))
ORDER BY tblDelivery.UnitID
What i am trying is to create another Select query with the following code:
SELECT qryScheduleCombine.DeliveryDate, *
FROM qryScheduleCombine
WHERE (((qryScheduleCombine.DeliveryDate)<=Date()));
This SQL doesnt look at the year at all. It only seems to be searching based
on the months and days. i would also like to create a condition where i can
select two dates (based from a calendar control) and only show records
between those two dates. I have been struggling with this for about a day
and a half and have given up...
am having a very difficult time getting the the whole date/time to work out.
tblDelivery.TrimStart and tblDelivery.TrimFinal are Date/Time fields
formatted as "m/d/yyyy" i dont care at all about the time.
SELECT tblDelivery.UnitID, tblJobInfo.JobID, tblJobInfo.JobNumber, [Address]
& " " & [UnitNumber] & " " & [City] AS Location, tblUnitSelections.Wing,
"TrimStart" AS DeliveryDescription, tblDelivery.TrimStart AS DeliveryDate
FROM (tblJobInfo INNER JOIN tblUnitSelections ON tblJobInfo.JobID =
tblUnitSelections.JobID) INNER JOIN tblDelivery ON tblUnitSelections.UnitID =
tblDelivery.UnitID
WHERE (((tblDelivery.TrimStart) Is Not Null))
ORDER BY tblDelivery.UnitID
UNION ALL SELECT tblDelivery.UnitID, tblJobInfo.JobID, tblJobInfo.JobNumber,
[Address] & " " & [UnitNumber] & " " & [City] AS Location, tblUnitSelections.
Wing, "TrimFinal" AS DeliveryDescription, tblDelivery.TrimFinal AS
DeliveryDate
FROM (tblJobInfo INNER JOIN tblUnitSelections ON tblJobInfo.JobID =
tblUnitSelections.JobID) INNER JOIN tblDelivery ON tblUnitSelections.UnitID =
tblDelivery.UnitID
WHERE (((tblDelivery.TrimFinal) Is Not Null))
ORDER BY tblDelivery.UnitID
What i am trying is to create another Select query with the following code:
SELECT qryScheduleCombine.DeliveryDate, *
FROM qryScheduleCombine
WHERE (((qryScheduleCombine.DeliveryDate)<=Date()));
This SQL doesnt look at the year at all. It only seems to be searching based
on the months and days. i would also like to create a condition where i can
select two dates (based from a calendar control) and only show records
between those two dates. I have been struggling with this for about a day
and a half and have given up...