Report Count
am 13.11.2007 01:46:58 von Mrbanner
I have a new database file which i have created
in my Table i have a field called name where 5 names can be selected
from list
also have a another field where the date is typed.
What i need to do is create sometype of calulation in a report where
i can pull data
What i need to do is create a report that adds how many times the name
is in the field
that looks like below if no date is entered i dont want to add it into
the details.
Because Adam may make a sale but he doesnt get the cash till the next
day
so i need to only Add them when the date is filled in .
What i need rerport to do is this
Adam 24/12/2007 147
Adam 10/11/2007 6
John 24/12/2007 8
John 10/11/2007 44
Also need a total as well
Total
24/12/2007 155
10/11/2007 50
Re: Report Count
am 13.11.2007 15:56:16 von OldPro
On Nov 12, 6:46 pm, Mrbanner wrote:
> I have a new database file which i have created
> in my Table i have a field called name where 5 names can be selected
> from list
> also have a another field where the date is typed.
> What i need to do is create sometype of calulation in a report where
> i can pull data
>
> What i need to do is create a report that adds how many times the name
> is in the field
> that looks like below if no date is entered i dont want to add it into
> the details.
> Because Adam may make a sale but he doesnt get the cash till the next
> day
> so i need to only Add them when the date is filled in .
>
> What i need rerport to do is this
>
> Adam 24/12/2007 147
> Adam 10/11/2007 6
> John 24/12/2007 8
> John 10/11/2007 44
>
> Also need a total as well
> Total
>
> 24/12/2007 155
> 10/11/2007 50
Use a query to create a recordset that excludes the unwanted records.
Then use the query to create a temporary table from which you can run
the report. You will probably want to allow the user to select a date
range, so put a couple of textboxes on the form that calls the
report. If you don't already have a form dedicated to this report, or
reports in general, then create one. Many reports require a date
range.
dim db as dao.database
dim sSQL as string
set db= currentdb( )
sSQL="INSERT INTO tblTemp SELECT * FROM tblSales WHERE [SaleDate]>=#"
& txtStartDate & "# AND [SaleDate]<= #" & txtEndDate & "# ;"
db.Execute sSQL
DoCmd.OpenReport SomeReport...