Expression Buider

jrsarrat

New Member
Joined
Jul 8, 2018
Messages
47
Hi there!

On an Access report, I'd like to add the total hours worked based on 4 fields that produce the following times: 1. initial daily log in, 2. log out for lunch, 3. back in from lunch, and 4. End of Day logout.

Can I use the Expression Builder (Design View>Property Sheet>Data tab>Control Source) directly from the report to provide me with each employee's total hours worked? Or, do I need to create another query?

The textbox on my report is currently unbound.

Your help is much appreciated!

Sincerely,

J.
 
Last edited:

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Please post some sample data and expected results so we can get a better understanding of your data structure.
 
Upvote 0
You cannot attach files, but you can post images using some tools mentioned in section B here: https://www.mrexcel.com/forum/board-announcements/127080-guidelines-forum-use.html

However, I find that you can usually Copy and Paste data from a Table or Query simply by using Copy & Paste.
Here is an example of me doing it below:

11/15/20101/15/2016
21/15/20101/15/2018
31/1/20104/1/2016
41/1/2010
5
1/1/2016
62/28/20042/28/2010

<tbody>
[TH="bgcolor: #c0c0c0"] ID [/TH]
[TH="bgcolor: #c0c0c0"] date1column [/TH]
[TH="bgcolor: #c0c0c0"] date2column [/TH]

</tbody>
 
Last edited:
Upvote 0
You cannot attach files, but you can post images using some tools mentioned in section B here: https://www.mrexcel.com/forum/board-announcements/127080-guidelines-forum-use.html

However, I find that you can usually Copy and Paste data from a Table or Query simply by using Copy & Paste.
Here is an example of me doing it below:

1
1/15/2010
1/15/2016
2
1/15/2010
1/15/2018
3
1/1/2010
4/1/2016
4
1/1/2010


5


1/1/2016
6
2/28/2004
2/28/2010

<tbody>
[TH="bgcolor: #C0C0C0"] ID
[/TH]
[TH="bgcolor: #C0C0C0"] date1column
[/TH]
[TH="bgcolor: #C0C0C0"] date2column
[/TH]

</tbody>


Thank you, Joe4!

Table:

12:01:31 PM


8/20/2018
102:24:59 PM2:25:24 PM2:26:03 PM2:26:44 PM8/20/2018

<caption> tblLogInOut </caption><thead>
[TH="bgcolor: #c0c0c0"] PF_ID [/TH]
[TH="bgcolor: #c0c0c0"] Log_In [/TH]
[TH="bgcolor: #c0c0c0"] Lunch_Out [/TH]
[TH="bgcolor: #c0c0c0"] Lunch_BackIn [/TH]
[TH="bgcolor: #c0c0c0"] LogOut_EOD [/TH]
[TH="bgcolor: #c0c0c0"] Dte [/TH]

</thead><tbody>
</tbody><tfoot></tfoot>
 
Upvote 0
So, in the first record of your example where there is no log-out time, what should be returned for that?
Do you have any records which would span two days? How do you show/account for that?
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,246
Members
452,623
Latest member
cliftonhandyman

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top