R
reportyemi
I have a 2 querries totaldeliverytype and totalcondition. and wanted to find
out the previous months result of deliveries and condition of baby. I am able
to get the type of delivery result for last month using this sql but when i
try for the condition, i donot get anything. What is wrong with my code
SELECT totaldeliverytype.[Delivery Method], totaldeliverytype.[Date of
Birth], Count(totaldeliverytype.[Delivery Method]) AS [CountOfDelivery
Method1]
FROM tblInfant1 INNER JOIN totaldeliverytype ON tblInfant1.[Date of Birth] =
totaldeliverytype.[Date of Birth]
GROUP BY totaldeliverytype.[Delivery Method], totaldeliverytype.[Date of
Birth], Year([totaldeliverytype]![Date of
Birth])*12+DatePart("m",[totaldeliverytype]![Date of Birth])
HAVING (((Year([totaldeliverytype]![Date of
Birth])*12+DatePart("m",[totaldeliverytype]![Date of
Birth]))=(Year(Date())*12+DatePart("m",Date())-1)));
code for condtion is
SELECT totalcondition.[ Condition of Baby], totalcondition.[Date of Birth],
Count(totalcondition.[ Condition of Baby]) AS [CountOfCondition of Baby]
FROM tblInfant1 INNER JOIN totalcondition ON tblInfant1.[Date of Birth] =
totalcondition.[Date of Birth]
GROUP BY totalcondition.[ Condition of Baby], totalcondition.[Date of
Birth], Year([totalcondition]![Date of Birth])*12+DatePart("m",[
totalcondition]![Date of Birth])
HAVING (((Year([totalcondition]![Date of Birth])*12+DatePart("m",[
totalcondition]![Date of Birth]))=(Year(Date())*12+DatePart("m",Date())-1)));
i have tried everything to no avail
yemi
out the previous months result of deliveries and condition of baby. I am able
to get the type of delivery result for last month using this sql but when i
try for the condition, i donot get anything. What is wrong with my code
SELECT totaldeliverytype.[Delivery Method], totaldeliverytype.[Date of
Birth], Count(totaldeliverytype.[Delivery Method]) AS [CountOfDelivery
Method1]
FROM tblInfant1 INNER JOIN totaldeliverytype ON tblInfant1.[Date of Birth] =
totaldeliverytype.[Date of Birth]
GROUP BY totaldeliverytype.[Delivery Method], totaldeliverytype.[Date of
Birth], Year([totaldeliverytype]![Date of
Birth])*12+DatePart("m",[totaldeliverytype]![Date of Birth])
HAVING (((Year([totaldeliverytype]![Date of
Birth])*12+DatePart("m",[totaldeliverytype]![Date of
Birth]))=(Year(Date())*12+DatePart("m",Date())-1)));
code for condtion is
SELECT totalcondition.[ Condition of Baby], totalcondition.[Date of Birth],
Count(totalcondition.[ Condition of Baby]) AS [CountOfCondition of Baby]
FROM tblInfant1 INNER JOIN totalcondition ON tblInfant1.[Date of Birth] =
totalcondition.[Date of Birth]
GROUP BY totalcondition.[ Condition of Baby], totalcondition.[Date of
Birth], Year([totalcondition]![Date of Birth])*12+DatePart("m",[
totalcondition]![Date of Birth])
HAVING (((Year([totalcondition]![Date of Birth])*12+DatePart("m",[
totalcondition]![Date of Birth]))=(Year(Date())*12+DatePart("m",Date())-1)));
i have tried everything to no avail
yemi