>>>suggestion for add new record to grid:
>>>
>>>since Parent table use newid(),
>>>set the child table's key's default value to get the current parent value from the setup table;
>>>
>>>This will work!
>>
>>It cannot work in a multi-user envirnoment.
>
>Tai, add a form property and store the parent key to this property. This will work in a multi-user environment because each user has a separate version of the form on his/her computer.
>
>HTH
>Barbara
You are right about that.
My friend, Chong HanWah, was suggesting putting 'ParentTable.ParentKey' in the default value of the child table validation rule. He was suggesting that if the child table is always related to the parent table, the child table will always get the correct default parent id whenever a new record is appended. In this way, the AllowAddNew=.T. will work without any coding on the form.
Will this work? It doesn't sound safe. But I can't think of any situation where it won't work. What is your opinion?
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement