Results 1 to 4 of 4
  1. #1
    smg is offline Competent Performer
    Windows XP Access 2010 64bit
    Join Date
    Apr 2019
    Posts
    121

    match weekly time periods to monthly invoice period

    I have two tables, one with weekly timesheet periods and one with monthly invoice periods, example:

    Time Periods
    Period From Period To
    08/24/2019 08/30/2019
    08/31/2019 09/6/20109
    09/7/2019 09/13/2019


    09/14/2019 09/20/2019
    09/21/2019 09/27/2019

    Invoice Periods
    Invoice Begin Invoice End Invoice Month
    08/24/2019 09/27/2019 Oct-19

    I need to add the invoice month column to the Time Periods Column with an append query but not sure how to write the formula to accomplish this and format it as mmm-yy

  2. #2
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,114
    Have a look at the attached file. I believe you actually need an update query (qryUpdateInvoiceMonthInWeeklyPeriod) to update the invoice month in the weekly periods table.

    Cheers,
    Attached Files Attached Files
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  3. #3
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Is this a one time thing?

    What is the TimeSheet table structure?
    What is the data type of the field "Invoice Month" (shouldn't have spaces in names) in the table "monthly invoice"?


    So the results should look like:
    Time Periods
    Period_From
    Period_To
    Invoice_Month
    08/24/2019 08/30/2019 Oct-19
    08/31/2019 09/6/2019 Oct-19
    09/7/2019 09/13/2019 Oct-19
    09/14/2019 09/20/2019 Oct-19
    09/21/2019 09/27/2019 Oct-19


    I would use an update query and VBA to loop through the "monthly invoice" table. You could have a starting invoice M/Y and an ending invoice M/Y.
    Could you post a copy of your dB with the two tables?

  4. #4
    Bullschmidt's Avatar
    Bullschmidt is offline Freelance DB Developer
    Windows 10 Office 365
    Join Date
    Mar 2020
    Location
    USA
    Posts
    64
    Also there is the complication that in general a month is about 4.3 weeks so would need to decide each time if the "month" has 4 weeks or 5. Personally I would just input the time periods table by hand - doesn't seems like that much work - about 64 entries per year (52 weeks + 12 "months")...

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

Similar Threads

  1. Replies: 22
    Last Post: 09-05-2019, 12:01 AM
  2. Weekly or monthly reports on Access
    By duddu in forum Access
    Replies: 2
    Last Post: 09-23-2017, 11:40 PM
  3. Replies: 5
    Last Post: 05-23-2017, 08:42 AM
  4. Monthly report with weekly totaSs
    By Alex Motilal in forum Reports
    Replies: 3
    Last Post: 09-27-2015, 10:26 AM
  5. Is weekly / monthly automation possible?
    By 10 Gauge in forum Access
    Replies: 4
    Last Post: 03-17-2011, 07:23 AM

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