AM querying an access database from vb6 using the following query
INSERT INTO stock([i_name],[ref],[qty],[supplier_id])
VALUES('dd','dddd','11',(SELECT id FROM suppliers WHERE s_name ='dangote'))
but i get the following error when i run the query
-2147467259 Unspecified error Microsoft JET Database Engine
can anyone tell me what is wrong
thanks
That looks to me like it should work. If you get an error, try pasting it into SQL View of a new query in Access.
If the field type of qty is numeric rather than text, discard the quotes around the value 11.