C
cvegas
When I run this code it takes up 100% of my cpu time. I think it's because
for the find first but don't know how to change it to work properly.
Any advise would be appreciated.
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[OrderID] = " & Me![Combo87] & ""
If rs.NoMatch Then
MsgBox " The OrderID in not in the Orders"
Me.Rest.SetFocus
Else
Me.Bookmark = rs.Bookmark
If [Type of Order] = 1 Then
DoCmd.OpenForm "edit orders FROMHISTORY", , , "Orderid =" &
OrderID
Else
DoCmd.OpenForm "edit outbound orders FROMHISTORY", , , "Orderid
=" & OrderID
End If
End If
Set rs = Nothing
End Sub
for the find first but don't know how to change it to work properly.
Any advise would be appreciated.
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[OrderID] = " & Me![Combo87] & ""
If rs.NoMatch Then
MsgBox " The OrderID in not in the Orders"
Me.Rest.SetFocus
Else
Me.Bookmark = rs.Bookmark
If [Type of Order] = 1 Then
DoCmd.OpenForm "edit orders FROMHISTORY", , , "Orderid =" &
OrderID
Else
DoCmd.OpenForm "edit outbound orders FROMHISTORY", , , "Orderid
=" & OrderID
End If
End If
Set rs = Nothing
End Sub