Getting a variable to print on a report

  • Thread starter Thread starter CD Tom
  • Start date Start date
C

CD Tom

In my form that I use to start a report I have the user
enter a beginning and ending date and then select a user
from a dropdown list. When I print the report from the
code I have the criteria set to the datesale
between "beginning date" and "Ending Date" and the user =
to the "users number". This works just fine and the
report does what I want it to. My problem is I need to
get a count of all the data between the beginning date
and ending excluding the user. I have put into the form
program a DCount which gives me the correct count I
need. My problem is I can't get the variable with that
count to show up on my report. I've set the variable up
as public but it still doesn't work. Any help would be
appreciated. I also want to use that variable to do some
calculations like percent of total sales.

Tom
 
Hi Tom.
A different approach would be to enter the dates and user
number on a form and set the query filters to the fields
on this form, that way you also can refer the report text
boxes to the fields on this report.
Hope this helps.
Fons
 
I always include the summary counts in the underlying
query or do the counts in the report, I have not used
DCount. Sorry I can not help you here.
Fons
-----Original Message-----
I do use the form to enter the dates and the user. This
approach works just fine. When I do the DCount on the
data between the dates (I do this also in the form) I get
the correct number but I can't get the variable from the
DCount to show up on the report. Is there some secret to
putting a public variable in a unbound box on a report.
 
Back
Top