Thank you - your reponse was right on -- however, I am getting an
additional
error that says "Could not delete from specified tables. (Error 3086)
You tried to delete data from one or more tables, but the deletion
could
not
be completed." I've checked the permissions?
--
thanks, mc
:
MC,
A Delete Query needs to have the table specified. The SQL always
looks
like this...
DELETE TableName.* FROM ...
It is not clear what you are trying to achieve with the Left Join.
This
would appear to indicate that you have records in the 2_073105 table
which do not have corresponding records in the Almost table. Is that
right? And in that case, the data returned by the query will include
these records, right? So how do the non-existent Almost records
relate
to what you are trying to achieve, if you catch my drift here? Are
you
really trying to delete all records from the Almost table where there
*are* matching records in the 2_073105 table? If so, the SQL would be
like this...
DELETE ALMOST.*
FROM ALMOST INNER JOIN 2_073105
ON ALMOST.[Well No]=[2_073105].QEP
Otherwise, if I have misunderstood, please try to explain what you
want
to happen.
--
Steve Schapel, Microsoft Access MVP
dallin wrote:
Below is the sql statement. Thanks.
DELETE ALMOST.Co, ALMOST.ST, ALMOST.[Opr #], ALMOST.[Well No],
ALMOST.Operator, ALMOST.[Well Name], ALMOST.[Prod Date],
ALMOST.[Current Gas
Imb], ALMOST.[Prior Mo Gas IMb], ALMOST.Status, ALMOST.[Stmt
Mailed],
ALMOST.[DOM requests], ALMOST.PIPELINE, ALMOST.Purchaser,
ALMOST.SYSTEM,
ALMOST.GWI, ALMOST.[Last Request], ALMOST.Comments, ALMOST.[P&A/Sell
Form],
ALMOST.[P&A/Sell Form to Acctg], ALMOST.GBA, ALMOST.[MAKE-UP],
ALMOST.[TERMS
FOR GBA], ALMOST.County, ALMOST.[LEGAL DESCRIPTION], ALMOST.ACQ,
ALMOST.[SOLD
DATE], ALMOST.[SOLD TO], ALMOST.[FILE LOCATION], ALMOST.Reserves,
ALMOST.ID
FROM 2_073105 LEFT JOIN ALMOST ON [2_073105].QEP = ALMOST.[Well No];