SELECT query as subquery to APPEND

T

tbrogdon

I am trying to use a SELECT query as a subquery to an APPEND query to
create a dynaset on the fly and append it into tblEmployeeProduction
from the click of a button on a form.

The only thing is that my SELECT query takes one parameter and because
of that I am unsure how to set up the APPEND portion of the query or
if it can be done at all.

Here are the opening lines of the SELECT's SQL:

PARAMETERS forms![frmSetEmpHours]![txtDate] DateTime;
SELECT [FirstName] & " " & [LastName] AS Name, forms!frmSetEmpHours!
txtDate AS ProductionDate,
'Do more stuff here............;

So the append would begin:

INSERT INTO tblEmployeeProduction (Name, ProductionDate, .....)
SELECTALL
FROM (and I don't know what goes here)

TIA,

Tim
 
D

Dale Fye

Tim,

You should be able to use:

PARAMETERS forms![frmSetEmpHours]![txtDate] DateTime;
INSERT INTO tblEmployeeProduction (Name, ProductionDate, .....)
SELECT [FirstName] & " " & [LastName] AS Name,
forms!frmSetEmpHours.txtDate AS ProductionDate,
'... more fields here
FROM yourTable
WHERE ...

HTH
Dale
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top