Hi Karen,
'~~~~~~~~~~~
'find the first value that matches
'-------------------- CHOOSE ONE
'if search control is numeric
Me.RecordsetClone.FindFirst "Field = " & me.SearchControlname
'if search control is text
Me.RecordsetClone.FindFirst "Field = '" & me.SearchControlname & "'"
'--------------------
'if a matching record was found, then move to it
'otherwise, go to a new record
If Not Me.RecordsetClone.NoMatch Then
Me.Bookmark = Me.RecordsetClone.Bookmark
else
docmd.runcommand acCmdRecordsGoToNew
'set control value if desired
me.controlname = me.SearchControlname
End If
'~~~~~~~~~~~
Warm Regards,
Crystal
*
(: have an awesome day

*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
Karen wrote:
> I have a form with a query as the record source. The form has a
> control (entercode) in the form header that is used as a seach field.
> The user enters a code in the control and clicks a button to find that
> code in the query.
>
> I'd like to have all of the controls in the details section of the
> form go blank when the user clicks in the entercode control again. I
> don't want to delete anything from the tables, just make the controls
> blank like they are when the form opens.
>
> anyone have any ideas for me?
>
> Karen S
>