queries in control source

  • Thread starter Thread starter seeker54
  • Start date Start date
S

seeker54

Can you right a count query in a control source of a
control on a report. I need to run percentages. The
script I have written is

=(select Count( [ar_trans_type_desc] ) from
qryForWriteOffReportPercentagesForReportTotal where
[ar_trans_type_desc] = 'Balance Write Off')/[text46]

This gives me a #Name? error.

seeker54
 
=DCount("*","qryForWriteOffReportPercentagesForReportTotal","[ar_trans_type_
desc] = 'Balance Write Off'") / [text46])

Consider renaming text46.
 
thank you for the directive. I put the script into the control source and
changed the text46 to txtTotalCountWriteOffs. It gave me #error

seekr54

Duane Hookom said:
=DCount("*","qryForWriteOffReportPercentagesForReportTotal","[ar_trans_type_
desc] = 'Balance Write Off'") / [text46])

Consider renaming text46.


--
Duane Hookom
MS Access MVP
--

seeker54 said:
Can you right a count query in a control source of a
control on a report. I need to run percentages. The
script I have written is

=(select Count( [ar_trans_type_desc] ) from
qryForWriteOffReportPercentagesForReportTotal where
[ar_trans_type_desc] = 'Balance Write Off')/[text46]

This gives me a #Name? error.

seeker54
 
What is your exact expression? What is the name of the control. Did you use
txtTotalCountWriteOFfs? Is there a field ar_trans_type_desc in your query?

--
Duane Hookom
MS Access MVP


seeker53 said:
thank you for the directive. I put the script into the control source and
changed the text46 to txtTotalCountWriteOffs. It gave me #error

seekr54

Duane Hookom said:
=DCount("*","qryForWriteOffReportPercentagesForReportTotal","[ar_trans_type_
desc] = 'Balance Write Off'") / [text46])

Consider renaming text46.


--
Duane Hookom
MS Access MVP
--

seeker54 said:
Can you right a count query in a control source of a
control on a report. I need to run percentages. The
script I have written is

=(select Count( [ar_trans_type_desc] ) from
qryForWriteOffReportPercentagesForReportTotal where
[ar_trans_type_desc] = 'Balance Write Off')/[text46]

This gives me a #Name? error.

seeker54
 
Back
Top