>>Does VFP have a function that will automatically generate a primary key? If not, wher would I get an example of a good genkey program?
>>/Steve Raddigan
Another important bit of code missed:
LOCAL lnSelect - goes with other local
lnSelect=SELECT() - goes at top of function
... rest of code
SELECT (lnSelect) - just before the return.
I normally forget this until after I've finished the function code, I'll have to write myself a template for functions.