Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Total special location on a report 1

Status
Not open for further replies.

aucamusc

MIS
Sep 22, 2008
9
CL
Hello!
I need some help with a simple report,
It's a monthly timing report for the personal.
It has 5 columns: Id, Date, clock in, clock off and difference (active time), like that it works fine.
But I was asked to place a total in a 6th column just at the level of the last movement (last row) of the day, there could be many ins and offs during the day, for each person.
I have a rough idea about use the date group header or footer, for the total of the group, but how I place it on the 6th column only at last row level of the group?
Clock in, clock off and difference are date/time (hh:mm) data type.
Access is 2007.
Thanks in advance for any help.
aucamusc
 
If I understand correctly, this would be like a running sum column hiding all but the final instance.

Assuming you have a date header (if not create one). In the date header, add two text boxes:
[blue]
Name: txtCountTimes
Control Source: =Count(*)
Visible: No

Name: txtSumActiveTime
Control Source: =Sum( [red]{expression for active time}[/red] )
Visible: No
[/blue]
Then add two text boxes to your detail section:
[blue]
Name: txtCountDate
Control Source: =1
Running Sum: Over Group
Visible: No

Name: txtLastSumActiveTime
Control Source: =IIf([txtCountDate]=[txtCountTimes],Val([txtSumActiveTime]),Null)
Visible: Yes
[/blue]


Duane
Hook'D on Access
MS Access MVP
 
Thanks Duane for your kind and quick answer, I follow your instruction literally, unhappily when I open the report I get the following pop up message:
"Insert parameter Value" (really it is in spanish, so this is a rough translation).
"txtCountDate"
a txtbox, and last line: "OK Cancel"
If I type in "1" the report opens.
On the other hand I got totals on the "txtLastSumActivTime" textbox from the 3rd group"
If you could give me a hand would be wonderful.

Thanks for you attention.

aucamusc
 
Excuse me Duane for the delay.
Unhappily I don't know what is happening with my PC in which I canno send you replies.
About the theme, I checked every letter and the whole spelling was OK.
Instead of the (+) I used the control F (which represent the date and it worked.
What's happening with Access 2007?
Thanks a lot for your help.

aucamusc
 
Excuse me, there was something wrong with the typing.
I meant in this suggested coding:

Name: txtCountTimes
Control Source: =Count(*)
Visible: No

I replaced the asterisk with an "F" that it is the name of the control that supports the date.
With the asterisk I had always an error.

Now it is working OK with that change.

Thanks a lot for your help.

aucamusc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top