HI,
I am using the coding below and the box appears if the records is not found, but the form, still loads, how do I stop the form loading if the record is not found.
my query on the form is
Hope this is of use, Rob.![[yoda] [yoda] [yoda]](/data/assets/smilies/yoda.gif)
I am using the coding below and the box appears if the records is not found, but the form, still loads, how do I stop the form loading if the record is not found.
Code:
Dim Msg As String, Style As Integer, Title As String
If Me.RecordsetClone.RecordCount = 0 Then
Msg = "No Records Found!"
Style = vbInformation + vbOKOnly
Title = "No Records Notice! . . . ."
MsgBox Msg, Style, Title
End If
my query on the form is
Code:
SELECT tblItemReceived.ReferenceNumber, tblItemReceived.DateLogged, tblItemReceived.TimeLogged, tblItemReceived.LoggedBy, tblItemReceived.ItemType, tblItemReceived.CustomerRef, tblItemReceived.DateClosed, tblItemReceived.ClosedAs, tblItemReceived.TimeClosed
FROM tblItemReceived
WHERE (((tblItemReceived.ReferenceNumber)=[Enter Reference Number to Find]));
Hope this is of use, Rob.
![[yoda] [yoda] [yoda]](/data/assets/smilies/yoda.gif)