Searching method

Hi, I am a spanish programmer. I don’t speak english very good.
It is the first time that i am programming with Servoy and i have a question.
I have a form to manage a table of the database and i would like to replace the search() standard method for another with my own SQL sentence.
So i filled the OnSearchCmd property of form and now, when i push F3 key (after push CTRL+F and write the string that i want to search) servoy uses my searching method. But i have a problem. I only can do one searching because “Find” option of menu is disabled after searching. The only way to enable Find option is to go to “design mode” and go back to “data mode” again.
What can i do to solve this situation.
My searching method (that is a method of the form) is something like this:

var query = “select id from …”;
var dataset =dabaseManager.getDataSetByQuery(controller.getServerName(), query, …);
controller.loadRecords(dataset);

Can you help me?
Thank you very much and sorry about my english.

I got a temporary solution. But i think it is a dirty hack.
After running the search i go to another form and back to the original one.

var dataset = databaseManager.getDataSetByQuery(controller.getServerName(), query, null, 10);
controller.showRecords( dataset );
application.showForm(forms.Hola);
application.showForm(forms.formulario2);

Probably the correct solution will be to refresh the form but i don’t know the way to do this.
I hope that it can be usefull to find out the correct solution.

joaquin:
I only can do one searching because “Find” option of menu is disabled after searching. The only way to enable Find option is to go to “design mode” and go back to “data mode” again.

I think you’ve forgotten to close the method with controller.search().
If you want to use onSearchCmd you have to close it with “controller.search()”
So Servoy can complete his searching the normal way.

Michael, thanks for your reply.
i tried to close the method with controller.search() but it didn’t work.
I think maybe this could be a bug in Servoy 3.1 but i am not sure.
As i said the day before yesterday, the only way i solved it was showing another form and back to the original one.