I have created a table in a databasecontainer that uses a function to set a randomnumber as a unique index (customer ID). This was described in Sander, Brentnall, Gunn's book The visual guide to VFP 3.0. Now however, I add a childgrid to my form with orders placed by these customers. Now when I try to add something, VFP asks if I want to add a record to just the parenttable, only the childtable or both. If I want to add only to the child (new order) everything works out fine. But if I want to add a customer (parentrecord), VFP seems to miss my function to create a unique new cusomer ID, so this ends up blank. This is no good since my next uppdate ends up with a unique index error. How do I solve this?
Nothing is impossible, it's just more or less complicated!