I have a table with a field DealDateContract. There are two additional fields in the table that need to be updated with information based on the date in this field, but I can't get the below to work. Am not sure if there is a QUATER function in ACCESS 2010.
Public Sub YearQuarterSort()
'UPdates quarter and quarter sort columns in tblReportSource table
Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenRecordset("tblReportSource")
With rst
rst.MoveFirst
Do While Not rst.EOF
.Edit
If IsDate(.DealDateContract) Then
!YrQtr = Year(.DealDateContract) & "-Q" & Quarter(.DealDateContract)
!YrQtrSort = Year(.DealDateContract) & "-Q" & Quarter(.DealDateContract) & .DealDateContract
.Update
Loop
rst.Close
Set rst = Nothing
End With
End Sub
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.