Append Query Problem

D

DavidES

I have a query that searches a table and gathers records based upon a
supplier code entered on a form and then appends them to a special table. All
is working well EXCEPT one supplier code. When I search that supplier code, I
do not receive any errors, it just locks up.

If I run the query as a select query, it works fine. I have checked all of
the data and can't find any problems with it.

The SQL code is as follows:

INSERT INTO NewList2 ( Item, CompA, CompB, CompC, distrib, name )
SELECT stock.number AS NUM, 0 AS Expr1, 0 AS Expr2, 0 AS Expr3,
stock.distrib, supplier.name
FROM supplier RIGHT JOIN stock ON supplier.code = stock.distrib
WHERE (((stock.distrib)=[Forms]![LLPage]![Combo8]) AND ((stock.break_out)=0)
AND ((IIf([Forms]![LLPage]![Combo3]=" ",IIf([construct]=True,1,0),1))=1)
AND ((stock.assoc)<>"SPEC" And (stock.assoc)<>"AUTO" And
(stock.assoc)<>"DROP") AND ((stock.discont)=0))
ORDER BY stock.number;

Any Ideas?
 

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

Similar Threads

Updateable Query problem in Windows 7 4
query too slow 1
Query Help 0
query very slow 5
Ranking with Nulls 2
Query from 3 other Queries 1
Revise an Append Query, or Change to an Update Query 3
Parameter Query 7

Top