Don't be too hard on yourself...C5 errors are nasty buggers that happen to everyone. In my experience they happen most with "dangling" or otherwise unresolved object references. Since you are passing an object reference in as a parameter, that may be the root of the problem.
By the way, do you have VFP SP4 installed? That (or was is SP3?) fixed a lot of C5 errors.
Dan LeClair
www.cyberwombat.comSET RANT ON - The Wombat BlogLife isn’t a morality contest and purity makes a poor shield. - J. Peter MulhernDisclaimer: The comments made here are only my OPINIONS on various aspects of VFP, SQL Server, VS.NET, systems development, or life in general, and my OPINIONS should not be construed to be the authoritative word on any subject. No warranties or degrees of veracity are expressed or implied. Void where prohibited. Side effects may included dizziness, spontaneous combustion, or unexplainable cravings for dark beer. Wash with like colors only, serve immediately for best flavor.