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?
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?