Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find code does not work - Help please

Status
Not open for further replies.

101287

MIS
Apr 8, 2006
189
US
I have the following code in my access application. The works 95% of the time but in ocassion it does not retrieve a record that is in the table. Can someone provide some guidance to correct this problem. Or work around. This code is execute when the custmer enter a number on a form and the record is display on the form.

=======================================================
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[ID] = " & str(Nz(Me![cboNumber], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
If rs.NoMatch Then
MsgBox "You need to update (instanciate) record
before selecting a new one." & vbNewLine & "Please
close the detail form and re-start your activity.",
vbInformation, "F-35 Self Portal"
End If
end if
========================================================
 



Please post MS Access VBA questions in forum703.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top