Combining - On Edit and On add (On load)

Combining - On Edit and On add (On load)


Hi

I've only been developing my app for the last couple of days so forgive me if
this is really easy to do but I haven't found it in the help:

I would like the "On add' and "On edit", "on load" parts of my form to execute the
same set of commands. However it seemed to me to be bad programming
to copy and paste the same code. Typically I would simply call the same
function from both the "On edit" and "on add" sections however since
a large amount of my onload script is using show and hide commands
it seems like I can't execute most of it from a function.

Is there a way to make the "On edit - On load" call the "On add - On load" so
So that I'm not duplicating code?

Thanks
Lawrence