Results 1 to 7 of 7
  1. #1
    ultra5219 is offline Advanced Beginner
    Windows 8 Access 2007
    Join Date
    Feb 2013
    Posts
    45

    Lightbulb calculation hrs for schedule

    hello


    i wana ask about calculation hours for schedule table. lets say how to calculate based on what i select from my schedule table for :
    no class: how many hrs
    lesson i got class: how many hours.. for example: 1+0.5= 1.5 hrs
    total of hours: which is based on "no class" + " lesson i got class" for example: 1+1+0.5= 2.5 hrs


    i need to someone to help me how to perform these calculations using access which i want to open schedule report which show the total hours of each this. is it using query or?

    help me

    Thanks again
    Attachment 12463

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,623
    Need to know what the data is like. Provide sample in post or attach database. Follow instructions at bottom of my post.

    Review: http://office.microsoft.com/en-us/ac...005188027.aspx
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    ultra5219 is offline Advanced Beginner
    Windows 8 Access 2007
    Join Date
    Feb 2013
    Posts
    45
    here is the sample looks like schedule class.. im having problem to perform calculation on my access.. i did attach the sample zip file above..
    Attachment 12465

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,623
    I see the link now.

    Consider this query for a start:

    SELECT tblAttendance.UserID, tblUSer.userName, tblTime.StartTime, tblTime.EndTime, DateDiff("n",[startTime],[EndTime])/60 AS ElapsedTime
    FROM tblTime RIGHT JOIN (tblUSer RIGHT JOIN tblAttendance ON tblUSer.userID = tblAttendance.UserID) ON tblTime.Time_ID = tblAttendance.Attend_Office;

    Use that query as the datasource for report using Grouping & Sorting features with aggregate calcs to total the ElapsedTime.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    ultra5219 is offline Advanced Beginner
    Windows 8 Access 2007
    Join Date
    Feb 2013
    Posts
    45
    ok since u said start by this query:

    SELECT tblAttendance.UserID, tblUSer.userName, tblTime.StartTime, tblTime.EndTime, DateDiff("n",[startTime],[EndTime])/60 AS ElapsedTime
    FROM tblTime RIGHT JOIN (tblUSer RIGHT JOIN tblAttendance ON tblUSer.userID = tblAttendance.UserID) ON tblTime.Time_ID = tblAttendance.Attend_Office;

    u mean, do i have to create a seperate query by using SQL or??
    OR create a report first, then from the datasource of report, use that query which i made from SQL??

    sorry, if still confusing.. can u teach me steps by steps?
    Last edited by ultra5219; 05-23-2013 at 02:08 PM.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,623
    I mean use the query designer to build and save that query. Use that query as the RecordSource for a report (unless you prefer to have that SQL statement directly in the report RecordSource).

    Access Help has guidelines on building reports with Grouping & Sorting features and aggregate calculations in footer sections. I see that you have a report that uses the Sorting feature but there is no grouping. Grouping might not be needed if you always filter the report for one user.

    This latest db posted does not have the same tables as the first db. New query:
    SELECT USer.USerID, schedule.class_ID, USer.USerNAme, USer.Department, Timess.Start_Time, Timess.End_Time, Timess.Hours, room.RoomName, Module.ModuleNAme, schedule.dayid, schedule.timeid, schedule.class_Valid_date, day_of_week.day_name FROM [USer] RIGHT JOIN (room RIGHT JOIN ([Module] RIGHT JOIN ((schedule LEFT JOIN Timess ON schedule.timeid = Timess.TimeID) LEFT JOIN day_of_week ON schedule.dayid = day_of_week.dayid) ON Module.ModuleID = schedule.moduleid) ON room.RoomID = schedule.room_id) ON USer.USerID = schedule.userID;

    Instead of using popup input parameter, use a form. Review http://datapigtechnologies.com/flash...mtoreport.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    ultra5219 is offline Advanced Beginner
    Windows 8 Access 2007
    Join Date
    Feb 2013
    Posts
    45
    Quote Originally Posted by June7 View Post
    I mean use the query designer to build and save that query. Use that query as the RecordSource for a report (unless you prefer to have that SQL statement directly in the report RecordSource).

    Access Help has guidelines on building reports with Grouping & Sorting features and aggregate calculations in footer sections. I see that you have a report that uses the Sorting feature but there is no grouping. Grouping might not be needed if you always filter the report for one user.

    This latest db posted does not have the same tables as the first db. New query:
    SELECT USer.USerID, schedule.class_ID, USer.USerNAme, USer.Department, Timess.Start_Time, Timess.End_Time, Timess.Hours, room.RoomName, Module.ModuleNAme, schedule.dayid, schedule.timeid, schedule.class_Valid_date, day_of_week.day_name FROM [USer] RIGHT JOIN (room RIGHT JOIN ([Module] RIGHT JOIN ((schedule LEFT JOIN Timess ON schedule.timeid = Timess.TimeID) LEFT JOIN day_of_week ON schedule.dayid = day_of_week.dayid) ON Module.ModuleID = schedule.moduleid) ON room.RoomID = schedule.room_id) ON USer.USerID = schedule.userID;

    Instead of using popup input parameter, use a form. Review http://datapigtechnologies.com/flash...mtoreport.html
    Thank You for respond my message. alright, i try first hope it works..

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Using access to schedule help
    By scoobz1234 in forum Access
    Replies: 11
    Last Post: 02-23-2018, 02:05 PM
  2. Schedule Report... maybe?
    By BusDriver3 in forum Reports
    Replies: 18
    Last Post: 01-08-2017, 04:05 PM
  3. Calculation Field in table vs Query calculation
    By Leonidsg in forum Database Design
    Replies: 18
    Last Post: 02-28-2013, 09:38 PM
  4. Tape Schedule
    By Vusi in forum Forms
    Replies: 6
    Last Post: 09-06-2011, 08:23 AM
  5. Flight schedule
    By t_g2 in forum Database Design
    Replies: 1
    Last Post: 01-20-2010, 01:13 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums