Access reserved error, Access2002.

  • Thread starter Thread starter Kenneth Miles
  • Start date Start date
K

Kenneth Miles

I get this error when trying to insert a record into a
database "Reserved error(-3025); there is no message for
this error."

Query:

INSERT INTO tblActionItem (lngActionItemOriginID)
SELECT (SELECT lngActionOriginID FROM
tblActionPriorityList WHERE lngActionOriginID=1)
WITH OWNERACCESS OPTION;

As a matter a fact this happens to all nested select
queries within insert. Access2002.
 
Try:

INSERT INTO tblActionItem (lngActionItemOriginID)
SELECT lngActionOriginID
FROM tblActionPriorityList WHERE lngActionOriginID=1
WITH OWNERACCESS OPTION
 
The problem is i need to get data from multipule tables.
And one value in the where clause is not equal to a record
(strActionOriginSubName) it does not insert a record.

For example if strActionOriginSubName does not
contain "audit" within the table "tblActionOriginSubName",
it will not insert a record. I want it to insert a null
value in the lngActionItemOriginSubID field if there is no
match. This query will not do that, it will not insert a
record at all.

INSERT INTO tblActionItem(lngActionItemOriginID,
lngActionItemOriginSubID)
SELECT lngActionOriginID, lngActionItemOriginSubID
From tblActionOrigin, tblActionOriginSubID
WHERE lngActionOriginID = 1, strActionOriginSubName
= "Audit"

I've tried another way around it
But this returns the access reserved error that i was
talking about......

INSERT INTO tblActionItem (lngActionItemOriginID)
SELECT lngActionOriginID, (SELECT lngActionItemOriginSubID
FROM tblActionOriginSubID WHERE strActionOriginSubName
= "Audit")
FROM tblActionOrigin
WHERE lngActionItemOriginId = 1
 
Perhaps, you need to post the relevant details of the Tables
"tblActionOrigin" and "tblActionOriginSubID" since this was not mentioned in
your original post and it certainly looks more complex.

BTW, you need to be precise in the SQL and in posting: you referred to a
Table
"tblActionOriginSubName" which did not appear in any SQL String. This
doesn't help potential respondents trying to answer your question.
 
Back
Top