I have a subform built into a form in Access 2007. I would like the user to be able to filter the subform using their own criteria by right clicking the column header in the subform. Once the user has the subform record set filtered as they want I would like them to be able to click a button on the main form that will set the yes/no field [EXCLUDE_LINE] in the filtered subfom data set to true.
Here is the code I have been trying to get to work and it keeps resulting in an error "Few to parameters, Expected 1"? I have searched and tried some different code as well with the same results. Any help is greatly appreciated.
Thanks - Mike
Here is the code I have been trying to get to work and it keeps resulting in an error "Few to parameters, Expected 1"? I have searched and tried some different code as well with the same results. Any help is greatly appreciated.
Code:
Private Sub Command196_Click() Dim strSql As String strSql = "UPDATE tblUtilizationDataAll SET EXCLUDE_LINE = -1 " strSql = strSql & "WHERE PROJECT_NAME = '" & Me.Text81 & "' And " & Me.tblUtilizationDataAll_subform.Form.Filter & ";" CurrentDb.Execute strSql Me.tblUtilizationDataAll_subform.Requery Me.Requery End Sub
Comment