Run-time error 2137 (1 Viewer)

P

Passie

Guest
Hi,

I get a Run-time error '2137' (You can't use find or replace now) but I don't understand why and what to do to fix this problem. I searched this forum and the internet but no solution. Down I placed the code of the Form.
This error only occurs when no record can be found otherwise it runs perfectly. I tryed to find out where the program stops, and it already stops at line (see below also):
"Forms![<form name>]![<Subform name>]![<field to search>].SetFocus"

Because I use the code below several times in this Form, the code "On Error Resume ...." will only work once.

What can I do?


Forms![<form name>]![<Subform name>].Visible = True
Forms![<form name>]![<Subform name>]![<field to search>].SetFocus
DoCmd.FindRecord <search string>, , False, , True



Thanks for your input.

Greating,

Pascal from the Netherland.
 
Last edited:
P

Passie

Guest
Problem solved. There was no record to be found, so the message is based on this. I thought it was a programming error. I used the code "On Error Resume Next" and my program runs OK.
 

Users who are viewing this thread

Top Bottom