pdvsa
asked on
Update strSQL with input box
Experts,
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?
thank you
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
Me.Requery
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?
thank you
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
Me.Requery
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
<<I see what you did.>>
Good! ;-)
Good! ;-)
ASKER