I am looking to copy data to a temp table to compile a report. Users will select the date range and the criteria to use.
I am looking for the user to select a criteria via a textbox in a form and to press print so the report is created. (Eg: if they put ToDoList in to the textbox then it will use the ToDoList data from the table for the report.)
I cannot work out how to get my SQL command to append the data from the table rather then the value from the textbox. My SQL line is:
DoCmd.RunSQL "INSERT INTO CustomRepData (Text1) SELECT Forms![Configuration]![Text1Field] FROM Diary WHERE TheDate = forms.Configuration.TextStartDate"
Text1Field is the name of the textbox on the form Configuration.
I am looking for the user to select a criteria via a textbox in a form and to press print so the report is created. (Eg: if they put ToDoList in to the textbox then it will use the ToDoList data from the table for the report.)
I cannot work out how to get my SQL command to append the data from the table rather then the value from the textbox. My SQL line is:
DoCmd.RunSQL "INSERT INTO CustomRepData (Text1) SELECT Forms![Configuration]![Text1Field] FROM Diary WHERE TheDate = forms.Configuration.TextStartDate"
Text1Field is the name of the textbox on the form Configuration.