What I'm trying to do is convert a year into an integer. The date is in a SQL database and I am using VB to extract the year. The following is only part of the query but I am certain this is the problem area. The error message I receive is "To few parameters, expected 1."
Here's part of the query that seems to be where the problem lies. In the immediate window it recognizes Date but not 'yyyy'.
CInt(DatePart('yyyy', Date))