what is the value of date_req ?
I just put a field on a form, defaulted it to date() and put your code
in the 'exit' event and it works fine
the 'format' of this field is 'medium date'
if you add 'Debug.Print CLng(date_req)', what value do you get in the
debug (ctl-g) window ?
I get 37987 for a date of 1/1/4
da*******@time.net.my (Daniel Tan) wrote in message news:<6a**************************@posting.google. com>...
In my code, i tried to use month function but it returned an type
mismatch error. Pls help. Thanks.
Dim mymonth As Integer
mymonth = Month([Date_req]) * [date_req] is a date type
Rgds,
Daniel