I'm trying to pass a value from a text box on a form to a subform on the same form in order to filter the subform.
Private Sub CmdSearchProperties_Click()
Me.[CAG_subform].Form.Filter = "[cagPostCode] = " & Me.txtPostcode.Value
Me.[CAG_subform].Form.FilterOn = True
The code 'seems' ok to me but every time i press the SearchProperties button i get an error:
'Microsoft Office Access can't find the field 'pipe' referred to in your expression.'
Any ideas? presuming i've just got syntax wrong?
I've also read that filtering is a bad idea, if so, what other methods can i do to pass the text box value to the datasheet so that only records that match the textbox value appear?