In cmdAdd.click() at line 183 starts the bit of code that adds the record to the parent table. If the key is empty it does an append blank else an insert. If you go there you can probably set your key value by calling your stored procedure from there. You can also try setting a breakpoint in that event to see what line of code is producing this dialog.
HTH
Eric Kleeman - EDS Consulting Services
MCP Visual FoxPro
MCSD C#.NET
Hua Hin Thailand
Los Angeles California