I am using the code below to add X number of days to a [DueDate]. I want to make it more dynamic and i/o having numerous buttons on the report for Adding 1 Day, 2 Days, 3 Days to the [DueDate] I would rather have an input box. I thought I could add the bolded areas below i/o having a hard coded number.
I get an error with the below.
How can I do what I am proposing?
Dim strSQL As String
strSQL = "UPDATE TASKS Set DueDate = DateAdd('d', [Enter Days to Add], DueDate) WHERE status <> 'Completed' AND DueDate= Date() [Enter How Many Days Ago]"
CurrentDb.Execute strSQL, dbFailOnError