Calculated Field Issue (1 Viewer)

KevlarKev

Registered User.
Local time
Today, 09:05
Joined
Jan 16, 2013
Messages
26
Hi all, hoping you can help me here.

I have a query which has a calculated field called MaxDate. This field is the max value of three other fields in the query, showing the maximum of those dates. It works fine but this field doesn't have any format set for it.

I want to then create another calculated field which adds a nominal amount of days to it (lets say 30 for now) so I type in this:

MaxDate+30: ([MaxDate]+30)

Problem is when I do this I get an #Error in the query when it runs.

I have tried to simply do date()+30 and this works fine so I am sure the issue is with the format of the MaxDate field being incompatible to add to? Or is that just me being wrong...

Suggestions would be VERY much appreciated...

HELP!!!
 

KevlarKev

Registered User.
Local time
Today, 09:05
Joined
Jan 16, 2013
Messages
26
Sorry, fixed it now.

It was the fact that the MaxDate wasn't setting as a date. I used CDate( in front of it to force the result to format as a date and this fixed the issue.

Thanks!
 

Mihail

Registered User.
Local time
Today, 19:05
Joined
Jan 22, 2011
Messages
2,373
Try:
Add_30_to_MaxDate: (CDate([MaxDate])+30)

If don't work, try to use DateAdd function.

If still not work, upload the database.
 

Users who are viewing this thread

Top Bottom