S
Samantha
I'm writing an SQL query to insert data from a query (qrySolQtyShipped)
that's already created into a table Forecast. The query qrySolQtyShipped
looks up parameters from a form. qrySolQtyShipped runs fine by itself. But
when I run the query with sql, I'm getting an error: "Run-time error '3061':
Too few parametrs. Expect 2."
My sql on a button click:
sql = "INSERT INTO Forecast (PartNumber)"
sql = sql & " SELECT [qrySolQtyShipped].[PN] FROM [qrySolQtyShipped];"
db.Execute sql, dbFailOnError
I can't see why it's not working except maybe because qrySolQtyShipped needs
to look up info from the form, and the sql is expect the parameter to be
passed along?
Any help is very much appreciated.
that's already created into a table Forecast. The query qrySolQtyShipped
looks up parameters from a form. qrySolQtyShipped runs fine by itself. But
when I run the query with sql, I'm getting an error: "Run-time error '3061':
Too few parametrs. Expect 2."
My sql on a button click:
sql = "INSERT INTO Forecast (PartNumber)"
sql = sql & " SELECT [qrySolQtyShipped].[PN] FROM [qrySolQtyShipped];"
db.Execute sql, dbFailOnError
I can't see why it's not working except maybe because qrySolQtyShipped needs
to look up info from the form, and the sql is expect the parameter to be
passed along?
Any help is very much appreciated.