title: MS Access: How can I repeat rows according to specific date criteria?
body: <p>I have a database that contains a company's billing info, the database helps fulfill the following objective: "determine the balance of accounts to date using the most recent information". </p>
  
  <p>Currently I have a table called unit_1 (I have several tables, one per business unit) which was being updated on specific days (when an external party sent the info in an excel file), the date when the update ocurred was registered in a field called update. There is a field called balance that allows me to find the info im looking for once I filter by date (the sum of the field balance is what I´m looking for). However I have different tables, so in order to find the balance for every date within a given range, I have been assigned to create a new table and insert a new field that contains all weekdays' dates (this input is equal for every table), this field is called cutoff_date. I need the new table to show for each weekday the most recent information available, thus the query/vba code must repeat rows according to this criteria. Below you can see an example of the initial table and the desired outcome table using three update dates (06/05(2 records),07/05(1 records) and 12/05(3 records)) for a range of 6 weekdays(06/05, 07/05, 08/05, 11/05, 12/05 and 13/05). </p>
  
  <p>Example: field update (initial table unit_1)</p>
  
  <pre><code>+------------+
  | update     |
  +------------+
  | 6/05/2020  |
  +------------+
  | 6/05/2020  |
  +------------+
  | 7/05/2020  |
  +------------+
  | 12/05/2020 |
  +------------+
  | 12/05/2020 |
  +------------+
  | 12/05/2020 |
  +------------+
  </code></pre>
  
  <p>Example: fields update and cutoff_date (desired table output)</p>
  
  <pre><code>+------------+-------------+
  | update     | cutoff_date |
  +------------+-------------+
  | 6/05/2020  | 6/05/2020   |
  +------------+-------------+
  | 6/05/2020  | 6/05/2020   |
  +------------+-------------+
  | 7/05/2020  | 7/05/2020   |
  +------------+-------------+
  | 7/05/2020  | 8/05/2020   |
  +------------+-------------+
  | 7/05/2020  | 11/05/2020  |
  +------------+-------------+
  | 12/05/2020 | 12/05/2020  |
  +------------+-------------+
  | 12/05/2020 | 12/05/2020  |
  +------------+-------------+
  | 12/05/2020 | 12/05/2020  |
  +------------+-------------+
  | 12/05/2020 | 13/05/2020  |
  +------------+-------------+
  | 12/05/2020 | 13/05/2020  |
  +------------+-------------+
  | 12/05/2020 | 13/05/2020  |
  +------------+-------------+
  </code></pre>
  
  <p>I would gretly apprecciate any help, on how to do this excercise. As I said before my inputs are the unit tables and the set of dates that i created for weekdays, while my desired output is a table that incorporates the most recent info for every week day.</p>
  
  <p>On the other hand I am concerned with database efficiency out of utter ignorance. The amount of records per update (example: 2,1 and 3) is given by the amount of billings that have a positive balance (as they still owe the company). The real amount of records can be around 3,500 per date per business unit, and the fact that my final table (union of all units) includes about 8 units (my boss wants all the info in the same place) concerns me. ¿Could somebody please shine some light on this matter also? </p>