Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2003
    Posts
    5

    Unanswered: Checking if date is the 1st Friday of the month!

    Need code that will check if a date is the 1st Friday of the month. I intend to put this as part of a string of multiple IIf's in a Text Box on a report. Currently running Access 2002.

    Appreciate all your suggestions!

    Thanks

  2. #2
    Join Date
    Jan 2003
    Location
    UK
    Posts
    5
    Create a module and insert the following function:

    '***start code
    Public Function FirstFriday(SelectDate As Date) As Integer

    If WeekDay(SelectDate) = vbFriday And Day(SelectDate) < 7 Then
    FirstFriday = True
    Else
    FirstFriday = False
    End If

    End Function
    '**end code


    Call the function (IIF example):

    IIf(FirstFriday(DATEENTERED) = True, "Yes it is the First Friday of the month", "No it isn't")

    Hope it helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •