I am try to embed a query into an Access code. I copied the sql statement of a query and pasted it into my code for a button in another form expecting it to run. No luck. See code below. Also, I notice code tables.Tablename.tablefieldname and Table!Tablename!Tablefieldname. what is the difference between using the "!" or "." as a separator?
SELECT to_dos.ID, to_dos.Task, to_dos.[Task Desc], to_dos.Interval, to_dos.Day, to_dos.DOM, to_dos.Distribution, to_dos.Minutes, to_dos.DateCompleted, to_dos.[Report Type], to_dos.[Report Location], to_dos.[Source Link], to_dos.[Other Source], to_dos.[Destination Link], to_dos.[Other Destination], to_dos.[Documentation Tab], to_dos.Instructions
FROM to_dos
WHERE (((to_dos.Interval)=[forms].[f_RptgSched].[CBx_Interval]));