Results 1 to 2 of 2
  1. #1
    templeowls is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2019
    Posts
    305

    Can a table or query auto populate Quarter # based on a date?

    Is it possible for a table or query to auto populate the Quarter number based on a date?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    It would be different for Fiscal Qtr, but:

    Code:
    Public Function CvtDate2Qtr(ByVal pvDate)
    Dim sQtr As String
    
    If IsNull(pvDate) Then Exit Function
    Select Case Month(pvDate)
        Case 1, 2, 3
           sQtr = "Q1:"
        Case 4, 5, 6
           sQtr = "Q2:"
        Case 7, 8, 9
           sQtr = "Q3:"
        Case 10, 11, 12
           sQtr = "Q4:"
    End Select
    CvtDate2Qtr = sQtr & Year(pvDate)
    End Function
    


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

Similar Threads

  1. Replies: 12
    Last Post: 05-02-2017, 07:39 PM
  2. Please help me to change quarter to date
    By vibinmvenugopal in forum Access
    Replies: 1
    Last Post: 10-17-2014, 06:05 AM
  3. Replies: 2
    Last Post: 05-22-2014, 06:11 PM
  4. Replies: 25
    Last Post: 11-16-2012, 12:47 PM
  5. Display previous quarter data when quarter is selected
    By rlsublime in forum Programming
    Replies: 1
    Last Post: 07-03-2012, 03:12 PM

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