I'm hoping there is an easy way I can return year only or trim a datetime field to year only. I am selecting all from a table, creating a datatable and looping through the rows to find all annual reports in the table.
Dim dr As DataRow
For Each dr In dscomm.Rows
reportYear += dr("ReportYear")
This is an example of the data that is returned:
8/30/2002 7:24:00 AM10/1/2003 4:28:03 PM9/24/2004 4:30:51 PM
What I need to do is get the years only and then link those years to another page which I can handle, but I can't figure out a method to just return year?
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…