Hello, I have a form and a subform based off a query, I am trying to run a SQL update statment from one of the fields in my subform. I know what fields in my table i want to update but the Where part of the statment is what i am having a issue with.
DoCmd.RunSQL "UPDATE [Daily Work] SET [Daily Work].QC_Start_Date = Date(), [Daily Work].QC_Start_Time = Time() WHERE ((([Daily Work].CUS)=[Forms]![QC_Queue_Qry Subform]![CUS]) AND (([Daily Work].LN)=[Forms]![QC_Queue_Qry Subform]![LN]) AND (([Daily Work].Note_Date)=[Forms]![QC_Queue_Qry subform]![Note_Date])))"
What this is trying to do is once the the field is updated i want to set the date and time of that record in my table, basicly i am trying to time stamp the record when the field in my subform in updated.
I am still learning VBA and SQL coding so any ideas would be great.
Thanks
DoCmd.RunSQL "UPDATE [Daily Work] SET [Daily Work].QC_Start_Date = Date(), [Daily Work].QC_Start_Time = Time() WHERE ((([Daily Work].CUS)=[Forms]![QC_Queue_Qry Subform]![CUS]) AND (([Daily Work].LN)=[Forms]![QC_Queue_Qry Subform]![LN]) AND (([Daily Work].Note_Date)=[Forms]![QC_Queue_Qry subform]![Note_Date])))"
What this is trying to do is once the the field is updated i want to set the date and time of that record in my table, basicly i am trying to time stamp the record when the field in my subform in updated.
I am still learning VBA and SQL coding so any ideas would be great.
Thanks