Public,
Check Access help for properusage of datediff.
A couple thing i notice about you example are the following: argument
should be separated by commas, datediff takes a string as the format first
argument so it should be surrounded by quotes and dates should be surrounded
by pound signs like this:
=DateDiff("m", #12/12/2007#, #1/1/2008#)
HTH,
Josh
> Hi,
> I have faced this problem a lot and I tried every possible solution with
[quoted text clipped - 9 lines]
> Any clues?
> Regards
Douglas J. Steele - 21 May 2008 17:36 GMT
You're correct about the quotes around m and the # delimiters for the dates,
but semi-colons may be legitimate, depending on the user's Regional
Settings.

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
> Public,
>
[quoted text clipped - 23 lines]
>> Any clues?
>> Regards
Public - 21 May 2008 18:52 GMT
Thanks guys for your help.
I got passed from one problem and stuck with another.
The date thing is working correctly now.
However, I want to display a result of expression (query) in a textbox and
the query is not in the record set of the form niether I want to put it there
(since there is another query that the form is using).
I just want to display the result of a query in my textbox and I face the
same problem of #Name?
Any ideas?
Regards
> You're correct about the quotes around m and the # delimiters for the dates,
> but semi-colons may be legitimate, depending on the user's Regional
[quoted text clipped - 27 lines]
> >> Any clues?
> >> Regards
Douglas J. Steele - 21 May 2008 18:57 GMT
Exactly what are you putting as the control source?

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
> Thanks guys for your help.
> I got passed from one problem and stuck with another.
[quoted text clipped - 7 lines]
> same problem of #Name?
> Any ideas?