Queries in feilds

R

Ron Bromwell

Hi All,
I want to do a query from a text box on an access report.
I set the text box to = select count(*) from table
When I run the report I get #Name. The table I am querying
is different than query for the report. Does anyone know
if this can be done and if so how?

Thanks,
Ron
 
A

Allen Browne

You cannot place a SQL statement into the Control Source property of a text
box.

Try a DCount instead, i.e.:
=DCount("*", "MyTable")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top