D
Dave
I have a form(frmProducts) on a tab control object (TabClt) that is on
another form(frmOrders).
I have a search box on frmProducts that filters "On change" and then keeps
its focus in that box.
Private Sub txtDescSearch_Change()
DoCmd.ShowAllRecords
Me.Filter = "Description like '" & txtDescSearch & "*'"
Me.FilterOn = True
Me.txtDescSearch.SetFocus
SendKeys "{F2}"
End Sub
It works fine when I open frmProducts by itself but when I open the tab it
is on from frmOrders.
When I enter the first search letter it does filter but the focus goes to
the tab label.
I tried changing
Me.txtDescSearch.SetFocus
To
Forms!frmProducts! txtDescSearch.SetFocus
But that did not seem to help either.
What am I doing wrong here?
Thanks in advance
D
another form(frmOrders).
I have a search box on frmProducts that filters "On change" and then keeps
its focus in that box.
Private Sub txtDescSearch_Change()
DoCmd.ShowAllRecords
Me.Filter = "Description like '" & txtDescSearch & "*'"
Me.FilterOn = True
Me.txtDescSearch.SetFocus
SendKeys "{F2}"
End Sub
It works fine when I open frmProducts by itself but when I open the tab it
is on from frmOrders.
When I enter the first search letter it does filter but the focus goes to
the tab label.
I tried changing
Me.txtDescSearch.SetFocus
To
Forms!frmProducts! txtDescSearch.SetFocus
But that did not seem to help either.
What am I doing wrong here?
Thanks in advance
D