G
Gary Dolliver
Hi all,
I had set up a look up button with the following code to be run when clicked:
Dim strFindID As String
On Error GoTo Err_Handler
strFindID = InputBox("Enter the Item ID you're looking for:")
If IsNumeric(strFindID) Then
With Me.RecordsetClone
.FindFirst "[Item_ID]=" & strFindID
If .NoMatch Then
MsgBox "Sorry, couldn't find that Item ID."
Else
Me.Bookmark = .Bookmark
End If
End With
Order_ID1.Value = Order_ID.Value
Creation_ID1.Value = Creation_ID.Value
Item_ID1.Value = Item_ID.Value
ProdCode1.Value = ProdCode.Value
Else
MsgBox "Please enter a valid Item ID!"
End If
Exit_Here:
Exit Sub
Err_Handler:
Resume Exit_Here
However, it no longer seems to be working (it worked a couple weeks ago, I
left it alone, and when I came back, it keeps stating that it cannot find the
ID (.NoMatch)
The form that the button is attached to is controlled by the table Items and
there is a field Item_ID in this table.
Any thoughts or help is always appreciated, thanks!
-gary
I had set up a look up button with the following code to be run when clicked:
Dim strFindID As String
On Error GoTo Err_Handler
strFindID = InputBox("Enter the Item ID you're looking for:")
If IsNumeric(strFindID) Then
With Me.RecordsetClone
.FindFirst "[Item_ID]=" & strFindID
If .NoMatch Then
MsgBox "Sorry, couldn't find that Item ID."
Else
Me.Bookmark = .Bookmark
End If
End With
Order_ID1.Value = Order_ID.Value
Creation_ID1.Value = Creation_ID.Value
Item_ID1.Value = Item_ID.Value
ProdCode1.Value = ProdCode.Value
Else
MsgBox "Please enter a valid Item ID!"
End If
Exit_Here:
Exit Sub
Err_Handler:
Resume Exit_Here
However, it no longer seems to be working (it worked a couple weeks ago, I
left it alone, and when I came back, it keeps stating that it cannot find the
ID (.NoMatch)
The form that the button is attached to is controlled by the table Items and
there is a field Item_ID in this table.
Any thoughts or help is always appreciated, thanks!
-gary