I have tried allsorts, but I really am stuck as to why this (attached) does not work.
The chart used to work, and the underlying query works, until the last record is added. Strangely, this record is not selected in the first level query from which the chart query get's it's data from.
An ideas??
Another Data mis-match
-
- 5StarLounger
- Posts: 736
- Joined: 18 Mar 2010, 11:05
Another Data mis-match
You do not have the required permissions to view the files attached to this post.
-
- Administrator
- Posts: 78573
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Another Data mis-match
I'm not sure why the DateSerial expression in the Row Source of the chart causes this error, but it works if you use
Closed: [DateClosed]-Day([DateClosed])+1
instead of
Closed: DateSerial(Year([DateClosed]),Month([DateClosed]),1)
Closed: [DateClosed]-Day([DateClosed])+1
instead of
Closed: DateSerial(Year([DateClosed]),Month([DateClosed]),1)
Best wishes,
Hans
Hans
-
- 5StarLounger
- Posts: 736
- Joined: 18 Mar 2010, 11:05
Re: Another Data mis-match
Wow! I've found a chink in the encyclopedic knowledge and experience of the mighty Hans
But thank you for a solution
But thank you for a solution
-
- 5StarLounger
- Posts: 1148
- Joined: 08 Feb 2010, 21:27
Re: Another Data mis-match
He still wins Hans down though !!!!
-
- Administrator
- Posts: 78573
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
-
- 3StarLounger
- Posts: 287
- Joined: 09 Mar 2010, 23:16
- Location: Canberra Australia
Re: Another Data mis-match
The problem is not actually with using DateSerial. If you remove the criterion >#12/31/2009# the DateSerial works correctly.
The problem is applying the criterion to the calculated field.
You can keep DateSerial by adding the DateClosed field and applying the criterion to that.
Applying criteria to calculated fields usually works, but if the calculation gets complicated it sometimes produces hand to understand errors.
Record 926 does not have a date closed.
The problem is applying the criterion to the calculated field.
You can keep DateSerial by adding the DateClosed field and applying the criterion to that.
Applying criteria to calculated fields usually works, but if the calculation gets complicated it sometimes produces hand to understand errors.
Record 923 is the last record that is both counted and has a date closed, so it is the last record returned by the query.Strangely, this record is not selected in the first level query from which the chart query get's it's data from.
Record 926 does not have a date closed.
Regards
John
John
-
- 5StarLounger
- Posts: 736
- Joined: 18 Mar 2010, 11:05
Re: Another Data mis-match
I could have sworn I tried that.JohnH wrote:The problem is not actually with using DateSerial. If you remove the criterion >#12/31/2009# the DateSerial works correctly.
The problem is applying the criterion to the calculated field.
You can keep DateSerial by adding the DateClosed field and applying the criterion to that.
Applying criteria to calculated fields usually works, but if the calculation gets complicated it sometimes produces hand to understand errors.
Record 923 is the last record that is both counted and has a date closed, so it is the last record returned by the query.Strangely, this record is not selected in the first level query from which the chart query get's it's data from.
Record 926 does not have a date closed.
Any idea why it threw up the error?
-
- Administrator
- Posts: 78573
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Another Data mis-match
I guess that the query optimizer attempts to combine the queries; this causes a problem because DateSerial(Null,Null,1) can't be evaluated.
Best wishes,
Hans
Hans