Forum Discussion
Tony2021
Feb 27, 2022Steel Contributor
Calculated Dates (taking into Account Holidays)
Hello Experts, I am building a table: tblDatesDeliver. There are 5 fields in this table. 2 are manually entered 3 should be calculated based on the number of business days count prior I h...
- Mar 11, 2022
im too lazy to follow the thread.
but i get the idea based on the worksheet to attached.
see your demo.
Tony2021
Feb 27, 2022Steel Contributor
thank you George. I poked around in those modules. Interesting. I saw something named "tlkpHoliday" (below pic). I assume that is a table and maybe I could change my holiday table to that name. I see also a dProposedDate, dStartDate and dEndDate and not certain how I can assign them in my case. I have not read all of it though. Probabaly wouldnt make much of a difference if I did since most of it I unfortunately dont understand, which you hinted that I might not be able to. I will keep poking around in it. thank you for the assistance.
George_Hepworth
Feb 27, 2022Silver Contributor
Back when I first created most of that code, I used a naming convention that included "tbl" prefixes for standard tables, "tlkp" for lookup tables, and "tjx" for junction tables. I got away from that because it's a bit of overkill for the most part. Your naming convention only needs to be consistent with what you otherwise do, although the VBA does have to line up with it.
I don't think it's so much a case of not understanding as it is wading through unfamiliar code for the first time and learning how someone else does things. Concentrate on the parts that do calculations of days between two dates to see if you can decompose the logic involved. At some point, you'll be able to reverse engineer that logic to create a calculated future date.
We all started somewhere, and jumping into the pool at the deep end isn't always the worst way to do that.