If you have a separate form for edit, delete, and search, why don't you just use the button wizard to open each form depending on what button they push? Or to code it just put docmd.openform "formname" on the 'on click' action for each button.
That would be much simpler than all this logical...