Find Next -- Only Works First Time

E

ExcelMan

I have a form where I give the user a button to click to bring up the
Microsoft Find and Replace Dialog Box. When the user clicks Find Next
they can find the first instance of the string they are searching
for. However, the next time the user hits Find Next the user gets the
message that the string is not found, even when a second instance of
the string exists in the set of records being searched.

The code I use, and have used previously successfully in Access, is:

Screen.PreviousControl.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70


On difference (I am not sure it matters) is that this form is part of
an Access Data Project (.adp) with a SQL Server back end. Another
thing to note is that when the dialog is closed, the focus is not on
the field being seached, but the first tab index control that is
enabled.

Anyone know why the user cannot find the second instance of the
string?

Thanks.
 

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

Top