G
Guest
The code below was placed in an unbound text box to select the order number
(not record number) to view and it works great. This code was entered in the
After_Update event:
If Me.Dirty Then 'Save first
Me.Dirty = False
End If
If IsNull(Me.OrderFind) Then 'Show all
Me.FilterOn = False
Else
Me.Filter = "[order] Like """ & Me.OrderFind & "*"""
Me.FilterOn = True
End If
Then I got the bright idea of setting up a button to add one to the number
in the text box and then pass focus to the box. I could repeat the use of the
button as needed to get to the order number I wanted. However, it appears
that since the text box was changed by another control, the update procedure
is bypassed and the after_update event is not executed. The code in the on
click event of the button is as follows:
If Me.Dirty Then 'Save first
Me.Dirty = False
End If
Me.OrderFind = Me.OrderFind + 1
Me.OrderFind.SetFocus
Is there some way to correct this problem or do I need to move the code to a
different event?
(not record number) to view and it works great. This code was entered in the
After_Update event:
If Me.Dirty Then 'Save first
Me.Dirty = False
End If
If IsNull(Me.OrderFind) Then 'Show all
Me.FilterOn = False
Else
Me.Filter = "[order] Like """ & Me.OrderFind & "*"""
Me.FilterOn = True
End If
Then I got the bright idea of setting up a button to add one to the number
in the text box and then pass focus to the box. I could repeat the use of the
button as needed to get to the order number I wanted. However, it appears
that since the text box was changed by another control, the update procedure
is bypassed and the after_update event is not executed. The code in the on
click event of the button is as follows:
If Me.Dirty Then 'Save first
Me.Dirty = False
End If
Me.OrderFind = Me.OrderFind + 1
Me.OrderFind.SetFocus
Is there some way to correct this problem or do I need to move the code to a
different event?