below is the union query statement that had been built. up until last week,
it had been working, however, for some reason, it is not cooperating:
SELECT A.EMPIDValidation AS EMPLOYEE, [Period ending] AS PEREND, "WEEK" AS
TIMECARD, 2 AS CATEGORY, A.ecode AS EARNDED, "" AS UNI, A.weekending AS
EARDEDDATE, A.Store AS GLSEG1, format(A.Regular,"0.00") AS HOURS, "TRUE" AS
WEEKLYNTRY, GL AS EXPACCT
FROM qryTimeCard_Stage2_Regular AS A WHERE (A.Regular<>0) AND GL<>""
UNION SELECT B.EMPIDValidation AS EMPLOYEE, [Period ending] AS PEREND,
"WEEK" AS TIMECARD, 2 AS Category, "OT" AS EARNDED, "" as UNI, B.weekending
AS EARDEDDATE, B.Store AS GLSEG1, format(B.OTHours_V,"0.00") AS HOURS, "TRUE"
AS WEEKLYNTRY, GL as EXPACCT FROM qryTimeCard_Stage2_OT AS B WHERE
(B.OTHours_V<>0);
I have tried to run them the two tables independently and they are okay.
nothing has changed for the data structure. the only funny point is that it
is creating a databse1 file in the same folder. Error message is pointing at
the fact that the recordset is readonly and thus not allowing for it to be
run (invalid operation).
MichaelRay - 27 Feb 2008 21:44 GMT
Are you saying that this union query does not run as a Select query, but that
both halves of it run correctly as select queries?
>below is the union query statement that had been built. up until last week,
>it had been working, however, for some reason, it is not cooperating:
[quoted text clipped - 16 lines]
>the fact that the recordset is readonly and thus not allowing for it to be
>run (invalid operation).