I have a datasheet subform with a combobox name Loan_ID_cbo. Whenever I update the filter via the combobox, the subform is updating the Loan ID (primary key) with the selected Laon ID from the subform, thereby changing the data on the table.
I would like to only filter this data and not allow the filter to edit the data on the table. How can I prevent this from happening?
Here is my VBA code for the After_Update event:
Private Sub Loan_ID_cbo_AfterUpdate()
Application.Echo False
Me.Filter = "MyKey = '" & Loan_ID_cbo & "'"
Me.FilterOn = True
If Loan_ID_cbo = "" Then
Me.Filter = ""
Me.FilterOn = False
End If
Application.Echo True
End Sub