Okay, other possibilities:
1. Look at the Name property of this text box. Make sure it's not the
same
as the name of any fields in the form. For example, it cannot be named
SidsteOfStatusændringDato.
2. What isSidsteOfStatusændringDato?
Is it:
a) A field from a table?
If so, what data type is this field when you open the table in design
view?
b) A calculated field in a query?
If so, what is the expression, and the data type of the fields in that
expression?
c) A text box with an expression in its Control Source?
If so, what is the expression, and the data type of the fields in that
expression? And what is in the Format property of the text box?
3. Are there any other calculated controls on this form? Do they work?
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Reply to group, rather than allenbrowne at mvps dot org.
Søren said:
Thanks a lot but actually, I still get the same syntax error message. I
am
really frustrated about this.
Best,
Søren
:
Try:
=DateDiff("d", Date(), [SidsteOfStatusændringDato])
Date works in VBA code, but it's best to include the function brackets
in
other contexts.
I write the following in the Control Source property of a form text
box,
but
get a message that the syntax is wrong:
=DateDiff("d", date, [SidsteOfStatusændringDato])