I have an Access form that has a datasheet subform that is populated using a table using the code below.
SELECT * INTO temp_filter_tbl FROM (SELECT DISTINCT JobsID, ID, ReferenceDate, Source, Status, NODE, NodeStatus, DocSource, CutOverYear FROM tempTable" & sqlafterwhere & ")"
db.Execute (sql)...