Insert Into Problem

adwaitjoshi

Registered User.
Local time
Today, 22:36
Joined
Aug 7, 2002
Messages
32
I have a Insert Into Query which looks up its value in a table so it will look something like

INSERT INTO Orders VALUES (3,(SELECT Product_ID FROM Product_Range WHERE [Name of The Product] = 'Bhujia'),0,1,0,0,0)

But since the values need actual values and not queries how can I do this?
 
Try using DLookup() instead of a subquery:-

INSERT INTO Orders
VALUES (3, DLookup("Product_ID","Product_Range","[Name of The Product] ='Bhujia'"), 0, 1, 0, 0, 0);
 

Users who are viewing this thread

Back
Top Bottom