Report Questions

  • Thread starter Thread starter hispeaches
  • Start date Start date
H

hispeaches

Good Morning,

I am having an access block and am in need of your wonderful help. If you
would be so kind, I would greatly appreciate it.
Below is what I am looking to do...

=DCount("[cas]","accounts","[cas]= 'yes' And [AuditMonth] = 'Month(Now())'
And [Hospital] = '" & [Hospital] & "'")/30

Next I would like a text box that takes the above result and * by Month
Number for example if the above result were 80 then 80 * 3 (March depending
upon the current month)..

Next I would need current month - previous month..

I know what I want to do however, not quite sure how to get it into the
lingo...
 
Did you actually copy the control source:
=DCount("[cas]","accounts","[cas]= 'yes' And [AuditMonth] = 'Month(Now())'
And [Hospital] = '" & [Hospital] & "'")/30

I wouldn't think this would work with the single quotes around Month(Now()).
If you want to multiply the result by the current month number,
=Month(Date()) * DCount("[cas]","accounts","[cas]= 'yes' And [AuditMonth] =
Month(Date())
And [Hospital] = '" & [Hospital] & "'")/30

I would probably create a totals query to use as the record source of a
subreport:

SELECT Hospital, Count([Cas]) as NumOf
FROM Accounts
WHERE Cas ='Yes' and AuditMonth BETWEEN Month(Date())-1 and Month(Date())+1
GROUP BY Hospital;

Place the subreport in your main report and link the Hospital fields.
 
Back
Top