>Hi,
> I would like to would like to add code in the BeforeOpenTables in the Data Environment of every form that I create. I would like to do this once and have it created automatically when I create the form. The code is the same for every form. Can this be done or do I have to hard code it to the form's data environment after I create a new form?
>
>Thanks in advance,
>Bob
If you use default DE yes (which is actually a property referencing an object). In VFP8 and later you can add your own DE directly in designer.
In previous versions writing a little prg that traverses all forms and adds a code like:
Updatede(THIS)
works wonderfully well.
PS: DE.BeforeOpenTables run before Form.Load.
Cetin