I have a form that contains a sub form. When a user has completed updating the form I then have a button that is supposed to update the field data and e-mail a report. The problem is that there may by multiple values in the sub form that have to be updated. I am not sure if I should use a loop statement or an array.
Here is the code that is executed when clicking the button:
Dim strSQL As String
On Error GoTo Err_Frm_Send_Click
strSQL = "Update TD_Status SET Date = Now(), Filed = True WHERE ID = Forms.Frm_Filing.ID;"
DoCmd.SetWarnings False
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.RunSQL strSQL
DoCmd.SendObject acSendReport
Thanks
Here is the code that is executed when clicking the button:
Dim strSQL As String
On Error GoTo Err_Frm_Send_Click
strSQL = "Update TD_Status SET Date = Now(), Filed = True WHERE ID = Forms.Frm_Filing.ID;"
DoCmd.SetWarnings False
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.RunSQL strSQL
DoCmd.SendObject acSendReport
Thanks