Set focus on form field for find record cmd

  • Thread starter Thread starter Joel
  • Start date Start date
J

Joel

I have a form that has a find record button based on the first form
field. When it is used the first time, it works correctly. The
find/replace dialog box states the field name to be searched. However,
any subsequent attempts generates an error where the dialog box is no
longer pointing to a field but to the whole table. How can I keep the
focus on this particular field on every attempt? I have tried SetFocus
which does work on the form but not the search.
 
Try something like:


Me.myTextBox.SetFocus
DoCmd.FindRecord "WhatYouWnatToFind", acAnywhere, False, acSearchAll,
False, acCurrent, False

Linda
 
Back
Top