View Full Version : Order by TEXTBOX ?
jamie_b 05-26-2008, 03:22 AM Hello,
In the Query for the report i have the following columns:
ID_User | Time_In | Time_Out | Time_Total
> The Time_In and Time_Out columns are formatted as General Date
> The Time_TOTAL column is not a value that is stored in a table. It is only used in the query. The code I use to calculate the Time_TOTAL is as follow:
TotalTime: Int([TimeOut]-[TimeIn]) & " day " & Format([Time_Out]-[Time_In],"h"" hr ""n"" min ""s"" sec""")
No problems so far...
So, in the Report's Detail section it displays the columns for :
ID_User, Time_In, Time_Out and Time_Total
Now, to get the GRAND TOTAL TIME, in the ID_User FOOTER, i have a textbox name txtGT_Time with the same code as the Time_Total column, ie:
=Int(Sum([TimeOut]-[TimeIn])) & " day " & Format(Sum([Timeout]-[TimeIn]),"h"" hr ""n"" min ""s"" sec""")
The report generates correctly and shows the TotalTime for each user.
What I'm trying to do is to SORT the report BY FOOTER, having the user with the most TotalTime at the top, or, the way I see it, is that I want to sort the report by >>> SortBy(or OrderBy) the textbox named "txtGT_TIME" which is in a Footer.
Any help appreciated.
Thank you.
Jamie.
ErikSnoek 05-26-2008, 03:50 AM So you have the column TotalTime (or was it Time_Total) in your query. What keeps you from ordering by that column?
jamie_b 05-26-2008, 04:06 AM So you have the column TotalTime (or was it Time_Total) in your query. What keeps you from ordering by that column?
In the Query I did sort Time_Total in Descending (which is what I want), but in the Report, the ID_User (FOOTER), is not sorted at all. I've tried the Report's Sorting and Grouping as well.
Any ideas, please.
jamie_b 05-27-2008, 12:08 AM What I'm trying to do is to SORT the report BY FOOTER, having the user with the most TotalTime at the top, or, the way I see it, is that I want to sort the report by >>> SortBy(or OrderBy) the textbox named "txtGT_TIME" which is in group Footer.
jamie_b 07-28-2008, 01:59 AM What I'm trying to do is to SORT the report BY FOOTER, having the user with the most TotalTime at the top, or, the way I see it, is that I want to sort the report by >>> SortBy(or OrderBy) the textbox named "txtGT_TIME" which is in group Footer.
I've google'd around for ideas and tried some other access forums as well.
Nothing. Seems like it cannot be done.
Any final thoughts on this, anyone ?
Please help if you can.
Thank you.
khawar 07-28-2008, 02:09 AM is the field being calculated on the report or in the query
jamie_b 07-28-2008, 02:27 AM is the field being calculated on the report or in the query
in the report footer, (see my initial post) :
Now, to get the GRAND TOTAL TIME, in the ID_User FOOTER, i have a textbox name txtGT_Time with the same code as the Time_Total column, ie:
=Int(Sum([TimeOut]-[TimeIn])) & " day " & Format(Sum([Timeout]-[TimeIn]),"h"" hr ""n"" min ""s"" sec""")
The report generates correctly and shows the TotalTime for each user.
What I'm trying to do is to SORT the report BY FOOTER, having the user with the most TotalTime at the top, or, the way I see it, is that I want to sort the report by >>> SortBy(or OrderBy) the textbox named "txtGT_TIME" which is in a Footer.
khawar 07-28-2008, 02:31 AM can you upload a sample i will find out some workaround
jamie_b 07-28-2008, 02:31 AM is the field being calculated on the report or in the query
in the report footer, (see my initial post) :
_________________________________________
Now, to get the GRAND TOTAL TIME, in the ID_User FOOTER, i have a textbox name txtGT_Time with the same code as the Time_Total column, ie:
=Int(Sum([TimeOut]-[TimeIn])) & " day " & Format(Sum([Timeout]-[TimeIn]),"h"" hr ""n"" min ""s"" sec""")
The report generates correctly and shows the TotalTime for each user.
What I'm trying to do is to SORT the report BY FOOTER, having the user with the most TotalTime at the top, or, the way I see it, is that I want to sort the report by >>> SortBy(or OrderBy) the textbox named "txtGT_TIME" which is in a Footer.
___________________________________________
I also thought i could do it in Query, and i tried running a Query on the report's Query but was not at all successful. appreciate your interest in this. Thank you.
jamie_b 07-28-2008, 03:36 AM Apologies for the previous double-post. Was doing too many things at once.
Attached is a sample of the DB I am working on.
I have put a note on the form and the report for you to look at.
Thanks again.
Jamie.
khawar 07-28-2008, 03:55 AM Checkout the ammended sample
I used another query to get the total time of user added that field to your query and in the report sorted on that usertotal field
jamie_b 07-28-2008, 04:30 AM Clearly I have yet to learn alot more...
You make it look so easy.
THANK YOU VERY MUCH!
Regards,
Jamie.
|
|