SELECT emergencyroom.ermonth, Avg(IIf([eroverallratingofcare]=1,0,IIf([eroverallratingofcare]=2,25,IIf([eroverallratingofcare]=3,50,IIf([eroverallratingofcare]=4,75,1000))))) AS MYercare, Avg(IIf([psinstructionscareforself]=1,0,IIf([psinstructionscareforself]=2,25,IIf([psinstructionscareforself]=3,50,IIf([psinstructionscareforself]=4,75,100))))) AS MYpscare, Avg(IIf([sopinstructionscareforself]=1,0,IIf([sopinstructionscareforself]=2,25,IIf([sopinstructionscareforself]=3,50,IIf([sopinstructionscareforself]=4,75,100))))) AS MYsocare, Avg(IIf([eroverallratingofcare]=1,0,IIf([eroverallratingofcare]=2,25,IIf([eroverallratingofcare]=3,50,IIf([eroverallratingofcare]=4,75,100))))) AS MYerrating, Avg(IIf([psoverallratingofcare]=1,0,IIf([psoverallratingofcare]=2,25,IIf([psoverallratingofcare]=3,50,IIf([psoverallratingofcare]=4,75,100))))) AS MYpsrating, Avg(IIf([sopoverallratingofcare]=1,0,IIf([sopoverallratingofcare]=2,25,IIf([sopoverallratingofcare]=3,50,IIf([sopoverallratingofcare]=4,75,100))))) AS MYsorating, Avg(IIf([opoverallratingofcare]=1,0,IIf([opoverallratingofcare]=2,25,IIf([opoverallratingofcare]=3,50,IIf([opoverallratingofcare]=4,75,100))))) AS MYoprating, Avg(IIf([erlikelihoodrecomservices]=1,0,IIf([erlikelihoodrecomservices]=2,25,IIf([erlikelihoodrecomservices]=3,50,IIf([erlikelihoodrecomservices]=4,75,100))))) AS MYerrecommend, Avg(IIf([pslikelihoodrecomservices]=1,0,IIf([pslikelihoodrecomservices]=2,25,IIf([pslikelihoodrecomservices]=3,50,IIf([pslikelihoodrecomservices]=4,75,100))))) AS MYpsrecommend, Avg(IIf([soplikelihoodrecomservices]=1,0,IIf([soplikelihoodrecomservices]=2,25,IIf([soplikelihoodrecomservices]=3,50,IIf([soplikelihoodrecomservices]=4,75,100))))) AS MYsorecommend, Avg(IIf([oplikelihoodrecomservices]=1,0,IIf([oplikelihoodrecomservices]=2,25,IIf([oplikelihoodrecomservices]=3,50,IIf([oplikelihoodrecomservices]=4,75,100))))) AS MYoprecommend, Round([MYercare],0) AS erInstructions, Round([MYpscare],0) AS psInstructions, Round([MYsocare],0) AS soInstructions, Round([MYerrating],0) AS ercarerating, Round([MYpsrating],0) AS pscarerating, Round([MYsorating],0) AS socarerating, Round([MYoprating],0) AS opcarerating, Round([MYerrecommend],0) AS errecommendservice, Round([MYpsrecommend],0) AS psrecommendservice, Round([MYsorecommend],0) AS sorecommendservice, Round([MYoprecommend],0) AS oprecommendservice
FROM inpatientsatisfaction RIGHT JOIN (outpatientservices RIGHT JOIN (emergencyroom RIGHT JOIN surgicaloutpatient ON emergencyroom.ermonth = surgicaloutpatient.sopmonth) ON outpatientservices.opmonth = surgicaloutpatient.sopmonth) ON inpatientsatisfaction.psmonth = surgicaloutpatient.sopmonth
GROUP BY emergencyroom.ermonth
HAVING (((emergencyroom.ermonth)=[forms]![er]![er]));