Orange, I think this is what you mean. I will open the passthrough query in design mode and replace the date I have with the updated date I need and then execute the query. I am in the infancy of VBA code and I am taking small steps at a time so I really do appreciate your help on this.
At this point I have created some vba code to open the query in edit mode and then to replace the date in the query. The query does open but I can't seem to get it to edit the open query in design mode. Can you give me some insight as to where I am going wrong? See code below. Thanks
Thanks
Code:
Sub ReplaceText()
Dim strQuery As String
Dim strSQL As String
strQuery = "qryMainACCUMTest"
DoCmd.OpenQuery strQuery, acViewDesign, acEdit
strSQL = Replace(strSQL, "28-FEB-2015", "31-JAN-2015", 1)
End Sub