'Invalid argument' error

M

mscertified

I'm getting 'Invalid argument' error trying to save this query. User claims
it ran fine until last Friday. Can anyone see a problem with the syntax? How
do you debug this type of thing? I removed the WHERE and ORDER BY and still
get the error, so it appears to be in the SELECT.
The query reads several tables via ODBC but I can open all the tables ok
independently of this query.
The database is around 2.5 meg in size if that could be a factor.
Any clues appreciated!
Dorian


SELECT
Format(SYSUSR_RM_CMP_REL.REL_MAJ,'00')+'.'+Format(SYSUSR_RM_CMP_REL.REL_MIN,'00')+'.'+Format(SYSUSR_RM_CMP_REL.REL_EMR,'00')
AS RELEASE, SYSUSR_RM_REL.REL_TYP AS TYPE,
Format(Left(SYSUSR_RM_CMP_SSR.SSR_NUM,4),'0000')+'-'+Format(Right(SYSUSR_RM_CMP_SSR.SSR_NUM,4),'0000')
AS SSR, Format(SYSUSR_RM_CMP_SSR.TASK_NUM,'00') AS TASK,
SYSUSR_SR_TASK.TITLE, SYSUSR_RM_CMP_REL.CMP_SYS, SYSUSR_RM_CMP_REL.CMP_TYP,
SYSUSR_RM_CMP_REL.CMP_NM, SYSUSR_RM_CMP_REL.VER,
IIf(SYSUSR_RM_CMP_REL.AZ_DAT>SYSUSR_RM_CMP_REL.HI_DAT,SYSUSR_RM_CMP_REL.AZ_DAT,SYSUSR_RM_CMP_REL.HI_DAT)
AS PROMOTE_DATE, IIf(SYSUSR_RM_CMP_REL.PATH_CD='A' Or
SYSUSR_RM_CMP_REL.PATH_CD='D','AZ',IIf(SYSUSR_RM_CMP_REL.PATH_CD='B' Or
SYSUSR_RM_CMP_REL.PATH_CD='E' Or SYSUSR_RM_CMP_REL.PATH_CD='F','HI','BT')) AS
STATE, SYSUSR_SR_TASK.TEAM_CD, SYSUSR_SR_TASK1.PROD_TICKET_NUM INTO
TEMP_CMP_REL
FROM (((SYSUSR_RM_CMP_REL INNER JOIN SYSUSR_RM_CMP_SSR ON
(SYSUSR_RM_CMP_REL.REL_MAJ = SYSUSR_RM_CMP_SSR.REL_MAJ) AND
(SYSUSR_RM_CMP_REL.REL_MIN = SYSUSR_RM_CMP_SSR.REL_MIN) AND
(SYSUSR_RM_CMP_REL.REL_EMR = SYSUSR_RM_CMP_SSR.REL_EMR) AND
(SYSUSR_RM_CMP_REL.CMP_SYS = SYSUSR_RM_CMP_SSR.CMP_SYS) AND
(SYSUSR_RM_CMP_REL.CMP_TYP = SYSUSR_RM_CMP_SSR.CMP_TYP) AND
(SYSUSR_RM_CMP_REL.CMP_NM = SYSUSR_RM_CMP_SSR.CMP_NM)) INNER JOIN
SYSUSR_RM_REL ON (SYSUSR_RM_CMP_SSR.REL_MAJ = SYSUSR_RM_REL.REL_MAJ) AND
(SYSUSR_RM_CMP_SSR.REL_MIN = SYSUSR_RM_REL.REL_MIN) AND
(SYSUSR_RM_CMP_SSR.REL_EMR = SYSUSR_RM_REL.REL_EMR)) INNER JOIN
SYSUSR_SR_TASK ON (SYSUSR_RM_CMP_SSR.TASK_NUM = SYSUSR_SR_TASK.TASK_NUM) AND
(SYSUSR_RM_CMP_SSR.SSR_NUM = SYSUSR_SR_TASK.SSR_NUM)) INNER JOIN
SYSUSR_SR_TASK1 ON (SYSUSR_SR_TASK.SSR_NUM = SYSUSR_SR_TASK1.SSR_NUM) AND
(SYSUSR_SR_TASK.TASK_NUM = SYSUSR_SR_TASK1.TASK_NUM)
WHERE (((SYSUSR_RM_CMP_REL.AZ_DAT)>=#11/27/2006# And
(SYSUSR_RM_CMP_REL.AZ_DAT)<=#12/03/2006#) AND
((SYSUSR_RM_CMP_REL.AZ_ENV)='4')) OR
(((SYSUSR_RM_CMP_REL.HI_DAT)>=#11/27/2006# And
(SYSUSR_RM_CMP_REL.HI_DAT)<=#12/03/2006#) AND
((SYSUSR_RM_CMP_REL.HI_ENV)='8'))
ORDER BY
Format(SYSUSR_RM_CMP_REL.REL_MAJ,'00')+'.'+Format(SYSUSR_RM_CMP_REL.REL_MIN,'00')+'.'+Format(SYSUSR_RM_CMP_REL.REL_EMR,'00'),
Format(Left(SYSUSR_RM_CMP_SSR.SSR_NUM,4),'0000')+'-'+Format(Right(SYSUSR_RM_CMP_SSR.SSR_NUM,4),'0000'),
Format(SYSUSR_RM_CMP_SSR.TASK_NUM,'00'), SYSUSR_RM_CMP_REL.CMP_SYS,
SYSUSR_RM_CMP_REL.CMP_TYP, SYSUSR_RM_CMP_REL.CMP_NM;
 
G

geebee

hi,

This is the error message of choice MS Access uses when the database size
exceeds anything over 2.00MB.
Try compacting and repairing the database, splitting the front end from the
backend (if you haven't already done so).

Hope this helps,
geebee
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top