ChristineMD
Board Regular
- Joined
- Jul 29, 2008
- Messages
- 53
Ok, so I have an access 2010 database (accdb) I'm using as a front end to pull data from a mysql server and an oracle server (linked tables).
I build queries and reports for a user who will run reports from this database who has access 2007. I have 2010.
I have a reasonably straightforward query that uses the "left()" function. When she tries to run this from her version she gets "undefined function in left expression" I'm assuming it doesn't like "right() either, but failed before the 2nd field definition. Are you FREAKING kidding me? I flipping HATE microsoft. Is it because I'm referring to input on a form? they enter a 2 digit year on the form, I look to a field in a table where the two digit year is the first two characters in the field.
I've built her lots of reports in a 2003 (mdb) front end database and there's not been an issue like this. Is it ME or is it M$? I'm fully willing to admit if I'm doing something stupid, but I sure don't see it. And it works when I run it from 2010. They can't build in backward compatibility for the left() function? #$@%#@$#
If any one can tell me if/where I'm going awry, that would be awesome.
Thanks in advance
I build queries and reports for a user who will run reports from this database who has access 2007. I have 2010.
I have a reasonably straightforward query that uses the "left()" function. When she tries to run this from her version she gets "undefined function in left expression" I'm assuming it doesn't like "right() either, but failed before the 2nd field definition. Are you FREAKING kidding me? I flipping HATE microsoft. Is it because I'm referring to input on a form? they enter a 2 digit year on the form, I look to a field in a table where the two digit year is the first two characters in the field.
I've built her lots of reports in a 2003 (mdb) front end database and there's not been an issue like this. Is it ME or is it M$? I'm fully willing to admit if I'm doing something stupid, but I sure don't see it. And it works when I run it from 2010. They can't build in backward compatibility for the left() function? #$@%#@$#
Code:
SELECT Left([yearseason],2) AS [Year], Right([yearseason],1) AS Season, Sum(IIf(Left([media],1)="P",[quantityordered])) AS [OSP Units], Sum(IIf(Left([media],1)="P",[quantityordered]*[price])) AS [OSP Demand], Sum(IIf(Left([media],1)="A",[quantityordered])) AS [AMZ Units], Sum(IIf(Left([media],1)="A",[quantityordered]*[price])) AS [AMZ Demand], Sum(IIf(Left([media],1)="S",[quantityordered])) AS [SON Units], Sum(IIf(Left([media],1)="S",[quantityordered]*[price])) AS [SON Demand]
FROM orddetail INNER JOIN ordmaster ON orddetail.OrderNumber = ordmaster.OrderNumber
GROUP BY Left([yearseason],2), Right([yearseason],1)
HAVING (((Left([yearseason],2))=[forms]![F21 Reports]![CPYear]));
If any one can tell me if/where I'm going awry, that would be awesome.
Thanks in advance