Why won't my simple calculation work

Geoff Codd

Registered User.
Local time
Today, 23:20
Joined
Mar 6, 2002
Messages
190
I have the following calculation which is placed in a text box on my report, I've used it before and it work but now all I get is

"The expreesion you have entered contains invalid syntax or you need to enclose your text data in quotes"

=DateAdd("d", -1, Format("01/" & Format(DateAdd("m", 1,Date()), "mm/yy"), "dd/mm/yy"))

Any ideas appreciated

Thanks
Geoff
 
Hi Geoff

This isn't going to help you much but I've just copied your code direct into a query and got the month end date as a result.

If I substitute the Date() for a dateField in a table I get the month end date of that date.

The code seems to work fine.

Col
 
Cheers Colin,

I've worked out that it has something to do with database being converted from 2k to 97 and there being a missing reference somewhere, I imported all the objects into a fresh database and it now works

what a pain.

Geoff
 
I know the feeling Geoff it happens to me all the time I wish everyone in the office would just get 2000 sometimes the reports don't work properly and the switchboards. I always have to browse for the missing references and it is a pain!
 

Users who are viewing this thread

Back
Top Bottom