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
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