can also check the calling routine by passing vars but i'm sure there is a more elegant way to do this.
When I have a more-or-less common routine which has to do some things a little differently, I just add an 'action' parameter...
Code:
FUNCTION Foo (BYVAL Action AS LONG, parm1 AS whatever, parm2 as whatever) AS LONG SELECT CASE action CASE %ACTION_NEW_OCCURENCE CASE %ACTION_QUERY STATUS CASE %ACTION_SUSPEND END SELECT (Code common to all, except you have set any action-dependent variables already) END FUNCTION
Leave a comment: