L
Lars Brownies
I'm trying to implement the inactivity check on
http://support.microsoft.com/kb/128814. It works well, except for one thing:
In my app I capture the Ctrl-F by a macro which executes a function that
checks if a filter is active. User can choose if he wants to drop the filter
before searching. After that the find dialog is triggered. This all worked
well till I added the inactivity check. Now when I press Ctrl-F I get "error
2137 Find & Replace cannot be used."
When I change the inactivity timer interval from 1000 to 20000, the Ctr-F
dialog does pop up, also if I repeat it a couple of tiems. But after a while
I get the 2137 error again and when I keep trying Ctrl-F again, from then on
I get this 2137 error everytime.
Even if I drop all the code in the function and only leave the 'find'-code
in (see code below) , the behavior is the same and I get the error.
Does anyone know what might cause this? Any ideas to solve it?
Thanks,
Lars
Function fSearch()
On Error GoTo Err_Handler
[...]
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
Exit_this_function:
Exit Function
Err_Handler:
MsgBox "Error# " & Err.Number & ": " & Err.Description
Call ErrorLog("Generic", "fSearch")
Resume Exit_this_function
End Function
http://support.microsoft.com/kb/128814. It works well, except for one thing:
In my app I capture the Ctrl-F by a macro which executes a function that
checks if a filter is active. User can choose if he wants to drop the filter
before searching. After that the find dialog is triggered. This all worked
well till I added the inactivity check. Now when I press Ctrl-F I get "error
2137 Find & Replace cannot be used."
When I change the inactivity timer interval from 1000 to 20000, the Ctr-F
dialog does pop up, also if I repeat it a couple of tiems. But after a while
I get the 2137 error again and when I keep trying Ctrl-F again, from then on
I get this 2137 error everytime.
Even if I drop all the code in the function and only leave the 'find'-code
in (see code below) , the behavior is the same and I get the error.
Does anyone know what might cause this? Any ideas to solve it?
Thanks,
Lars
Function fSearch()
On Error GoTo Err_Handler
[...]
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
Exit_this_function:
Exit Function
Err_Handler:
MsgBox "Error# " & Err.Number & ": " & Err.Description
Call ErrorLog("Generic", "fSearch")
Resume Exit_this_function
End Function