findrecord help

J

James

I have findrecord working, but if there is nothing with the search value it
doesn't display a message. It add a record on a new form or changes info on
an existing info. This is what I have:

----------start code------------

Me.PackageID.SetFocus
DoCmd.FindRecord Me.GoToTrackingNo, acStart
If IsNull(Me.PickUpDate) Then
Me.PickUpDate = Now()
MsgBox "Package ID No: " & Me.PackageID & " -- Tracking #: " &
Me.TrackingNo, , "Package pick-up information was saved successfully."
Me.GoToTrackingNo.SetFocus
Else
MsgBox "This package has already been picked up!"
Me.GoToTrackingNo.SetFocus
End If
-------end code----------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top