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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DoCmd.FindRecord Question 1

Status
Not open for further replies.

numbat

Technical User
Jul 23, 2002
6
CR
I need a routine that finds a record typed into a text box. My question is how do you notify the user if the record was not found. DoCmd doesn't seem to return an error when it doesn't find a record. Does anyone have any tips?
 
Take a look at the DLookUp function:
If IsNull(DLookUp("ColumnName","TableName","Criteria")) Then
MsgBox "Not Found"
Me.TextBox1.SetFocus
End If

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top