Hi, it's me again
I've got:
1. txtsSarch(textbox)
2. cmdSearch(button)
3.subTrans(a subform within the form)
every time i push the button my subform present the search result according
to the search filter(txtSearch) and it works fine.
here is the code:
Private Sub cmdSearch_Click()
Me.subTrans.Form.RecordSource = "select * from Transaction where Name like " & """" & "*" & _
Me.txtSearch & "*" & """"
subTrans.Requery
End Sub
I would like the subform to present the search results without pushing the
button, so I've copied the code to the On Key press event(of the txtSearch) but it doesn't work, any idea why?

I've got:
1. txtsSarch(textbox)
2. cmdSearch(button)
3.subTrans(a subform within the form)
every time i push the button my subform present the search result according
to the search filter(txtSearch) and it works fine.
here is the code:
Private Sub cmdSearch_Click()
Me.subTrans.Form.RecordSource = "select * from Transaction where Name like " & """" & "*" & _
Me.txtSearch & "*" & """"
subTrans.Requery
End Sub
I would like the subform to present the search results without pushing the
button, so I've copied the code to the On Key press event(of the txtSearch) but it doesn't work, any idea why?