G
gls858
I'm trying to add to a database that was designed by someone
else. Add to that my lack of understanding SQL and I obviously have
a problem
I've manage to get this far by mimicking existing sql statements.
sql = "SELECT ECNHDetail.* INTO 2005ECNHDetail" & _
"FROM ECNHDetail" & _
"WHERE (((ECNHDetail.InvoiceDate) >= #" & txtStartDt & "# And
(ECNHDetail.InvoiceDate) <= #" & txtEndDt & "#));"
DoCmd.RunSQL sql
ECNHDetail is a table containing sales history for 3 years. I want to
do a make table and create a table for just one year 2005ECNHDetail
based a date range. I have a form to select the dates and customer.
Right now I'd be happy just to get this part to run. I get
Runtime Error 3067
Query must contain at least one table or query
ECNHDetail is a table. What am I missing?
else. Add to that my lack of understanding SQL and I obviously have
a problem

sql = "SELECT ECNHDetail.* INTO 2005ECNHDetail" & _
"FROM ECNHDetail" & _
"WHERE (((ECNHDetail.InvoiceDate) >= #" & txtStartDt & "# And
(ECNHDetail.InvoiceDate) <= #" & txtEndDt & "#));"
DoCmd.RunSQL sql
ECNHDetail is a table containing sales history for 3 years. I want to
do a make table and create a table for just one year 2005ECNHDetail
based a date range. I have a form to select the dates and customer.
Right now I'd be happy just to get this part to run. I get
Runtime Error 3067
Query must contain at least one table or query
ECNHDetail is a table. What am I missing?