Choose an order number in a list box from a control box.
I want to find an order number in the list box by typing the number of the order in a control box.
I want by typing the number of the order to go to the that particular order in the list box.
However i cannot do it.The name of my List Box is CboOrder and each order number within the list
box is an Integer.The form containing the list box is called Form1. I have build the following
code however it seems it is totally wrong and i have bungled everything. Could somebody help me out
of that mess?
Dim strOrderID As String
Dim Order as control
set OrderID = Forms![Form1]![CBoOrder]
Dim strBookmark As String
strBookmark = Forms![Forms1![CboOrder].Bookmark
strOrderID = InputBox(“Please enter OrderID number “)
OrderID.RecordsetClone.FindFirst “OrderID = ” & strOrderID
If OrderID.RecordsetClone.NoMatch Then
MsgBox “OrderID ” & strOrderID & ” Not Found!!”
OrderID.Bookmark = strBookmark
Else
OrderID.Bookmark = OrderID.RecordsetClone.Bookmark
End If