My question was deleted because of duplicate but this is not the case. My example uses an already made sql-string. The answer SO does not and where SO is referring to is way to complicated to implement in my solution. I try to edit my post and be more clearly about my issue. So I have a form which connects to an external database. My query qry_LIMS selects the relevant data.
LIDNUMMER = "([LIDNUMMER] = " & LIDNUMMER_Integer & ")"
MONSTERTYPE = "([MONSTERTYPE] = '" & Monstertype_String & "')"
MONSTERNDATUM = "([MONSTERNDATUM] = '" & Datum_String & "')"
strCriteria = LIDNUMMER & "And" & MONSTERTYPE & "And" & MONSTERNDATUM
task = "Select * from qry_LIMS where (" & strCriteria & ")"
Me.Form.RecordSource = task
What is the most easy way to insert all records from task
into an other table named tbl_LIMS
?
The named fields of my table tbl_LIMS
are the same as qry_LIMS
:
Lidnummer
Monstertype
Monsterndatum
I think the solution would rather easy but I do not seem to get it
INSERT INTO tbl_LIMS VALUES (task)