Putting query results on report

  • Thread starter Thread starter Luther
  • Start date Start date
L

Luther

Hi,

I have a query as such:

SELECT Count([PlanID]) AS HowMany
FROM HiPlanNames
WHERE (((HiPlanNames.LastUpdated)<=Date()));

I need to put the result of HowMany (this field is
calculated) with a label. Is this possible?

Thank you in advance.
 
Luther,

Here are a few possible ideas...
1. Add this query, not joined to the existing table(s), to the query
that your report is based on. Then the HowMany field will be available
to be included in a bound textbox on the report.
2. Put an unbound textbox on the report, and in its Control Source
property enter:
=DLookUp("[HowMany]","YourAsSuchQuery")
3. Scrap your query, and put an unbound textbox on the report, and in
its Control Source property enter:
=DCount("*","HiPlanNames","[LastUpdated]<=Date()")
 
Thank you; they worked!!! I like solutions 2 & 3. Very
simple.
-----Original Message-----
Luther,

Here are a few possible ideas...
1. Add this query, not joined to the existing table(s), to the query
that your report is based on. Then the HowMany field will be available
to be included in a bound textbox on the report.
2. Put an unbound textbox on the report, and in its Control Source
property enter:
=DLookUp("[HowMany]","YourAsSuchQuery")
3. Scrap your query, and put an unbound textbox on the report, and in
its Control Source property enter:
=DCount("*","HiPlanNames","[LastUpdated]<=Date()")

--
Steve Schapel, Microsoft Access MVP

Hi,

I have a query as such:

SELECT Count([PlanID]) AS HowMany
FROM HiPlanNames
WHERE (((HiPlanNames.LastUpdated)<=Date()));

I need to put the result of HowMany (this field is
calculated) with a label. Is this possible?

Thank you in advance.
.
 

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

Back
Top