Is [Start] null? If it is, that is the problem.
--
Paul Overway
Logico Solutions
http://www.logico-solutions.com
"TOMK" <(E-Mail Removed)> wrote in message
news:091283DD-E7F4-40C2-A4A3-(E-Mail Removed)...
>I am trying to use the "Year( #1/1/2005#)" Function where I replace the
> "#1/1/2005#" value with a variable that is a date entered into a field
> called
> [Start]. I have tried to define this variable as integer and and just
> about
> every other data type there is, but I keep getting the "Type Mismatch"
> message. the code looks like
> Dim StartYear As Date
> Dim x As Integer
>
> StartYear = [Start] '[Start] is a "Date/Time" field
> MsgBox ("StartYear = " & StartYear)
> x = Year(StartYear)
> MsgBox ("X is " & x)
>
> I don't know what I am doing incorrectly, but for some reason I can't get
> the thing to work.
>
> Any help would be appreciated.
> --
> Tomk