INSERT INTO "record single"

M

MS

Hi all,

I have the sequent Query:
INSERT INTO TbFornitoriProdotti ( IdProdotto, IdFornitore )
SELECT TbProdotti.IDProdotto, TbOrdini.IdFornitore
FROM TbProdotti, TbOrdini;

I must change it in line up to record single
and to Load with RunSQL.
Thanks.
Marcello
 
J

John Nurick

Dim strSQL As String

strSQL = "INSERT INTO MyTable ( Field1, Field2 ) " _
& "VALUES ( 2, 'CIRIO' )"

DoCmd.RunSQL strSQL

(or, better,

CurrentDB.Execute strSQL, dbFailOnError

)
 
M

MS

Hi John
The routine don't work.
The problem is..........
Instruction SQL don't correct. To Use 'DELETE', 'INSERT', 'PROCEDURE',
'SELECT' or 'UPDATE'
Marcello
 
M

MS

Hi John
INSERT INTO TbFornitoriProdotti ......
TbProdotti.IDProdotto, TbOrdini.IdFornitore FROM TbProdotti, TbOrdini
Marcello
 
J

John Nurick

Hi Marcello,

I still don't understand what record(s) you want to insert into
TbFornitoriProdotti. Please give examples.
 
M

MS

Hi John
I Must insert into TbFornitoriProdotti the news products
by Form.
If you want i send you E-mail
Marcello
 
Top