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 Record - Not working.

Status
Not open for further replies.

101287

MIS
Apr 8, 2006
189
US
I have the following code sometimes when I select the cboNumber (customer) which is in a combo box built by a query it fails and display "The record is not on File"...

However, the record exist and is located in the Me.cboNumber. Does any know why this error? Or any suggestion to overcome this wrincle?

Me.cboAccountManager = ""
Me.cboStatus = ""
Me.cboFinalDisposition = ""
' Find the record that matches the control.
Me.FilterOn = False
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
Me.cboNumber = ""
'rs.noNomatch need to be use to display message when record not Found
If rs.NoMatch Then
MsgBox "The record is not on File" & vbNewLine & "Please select another Number or depress drop drow list", vbInformation, "F-35 Self Portal"
End If

Like always guidance and collaboration appreciated.

Luis
 



Hi,

What application, please.

MS Access questions can best be addressed in one of the many MS Access forums like forum705.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Platform: Ms access 2007.
Apologies, Luis
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top