• WSEnvoyPV

    WSEnvoyPV

    @wsenvoypv

    Viewing 6 replies - 1 through 6 (of 6 total)
    Author
    Replies
    • in reply to: Working Days (Access 97) #665211

      Yes, Pat, you’d have to change source code for each region OR add source for each region that you were going to distribute to and take region as input from some source. I chose the method I did because it was an “in-house” federal gov’t database. This way, the users and I never have to concern ourselves about updating any “holiday” table.

      The specific application it’s used for is to schedule operations from month to month. Some ot these jobs are daily, or every Monday or the first working day of every month, and occasionally some are manually assigned – you get the idea. If a user selects a job to be run and accidentally clicks on a holiday date, they are prompted that they’ve chosen a holiday and that the date has been changed for them to “xdate”.

    • in reply to: Working Days (Access 97) #664834

      In the code from the other posts, just change the Select Case Month(datCurrDate) to cover your country/region. For example, February would be changed like this for New Zealand:
      Case 2
      If Day(datCurrDate) = 6 Then ‘ For Waitangi Day
      datChkDate = datCurrDate
      End If
      If datChkDate = datCurrDate Then booHol = True

    • in reply to: Working Days (Access 97) #664821

      Refer to post 127952. The email address in the attachment to that post has changed, but the code’s still valid and could be modified for NZ instead of USA. Also, here’s an algorithm I found for Easter that could be made a part of the code in the referenced post.

      Algorithm from anonymous correspondent from New York to Nature in 1876

      In the text below, / represents an integer division neglecting the remainder, while % is division keeping only the remainder (MOD). So 30/7=4 ,

      and 30%7=2 .

      a=year MOD 19
      b=year/100
      c=year MOD 100
      d=b/4
      e=b%4
      f=(b+8)/25
      g=(b-f+1)/3
      h=(19*a+b-d-g+15)MOD 30
      i=c/4
      k=c%4
      l=(32+2*e+2*i-h-k)%7
      m=(a+11*h+22*l)/451
      Easter Month =(h+l-7*m+114)/31 [3=March, 4=April]
      p=(h+l-7*m+114)MOD 31
      Easter Date=p+1 (date in Easter Month)

    • in reply to: Holiday Table (Access 2000) #578684

      There was a lot of traffic on this topic in Woody’s Access Watch a month or three ago, so check there, too.

      I was challenged a couple years ago to come up with a more permanent solution than a table of holidays, particularly because of Outlook date snafus, and came up with the attached code. A case statement out of the attached actually made it into a Readers Respond 🙂

    • in reply to: Report Print Margins (A97) (Access 97 SR2) #567411

      Thanks for the reply. The print goes all the way to the right edge. It truly is a stupid design that’s about 20 years old, but it’s a federal form and we’re stuck with it. If nobody can come with something on this, I may have to try Unix.

    • in reply to: On New Mail Event? (98/2000) #548802

      Still looking for that automatic fix. Thanks anyway, Barry smile

    Viewing 6 replies - 1 through 6 (of 6 total)