>>Hi Viv,
>>
>>It didn't work. Because I have the autoopentables set to .t., it goes on to try to open a table that, say is missing, and then errors. And autoopentables is read only at run time, so I can't change the value. Any other ideas?
>
>IIRC, if you return .F. from BeforeOpenTables() then there will be no attempt to open.....
UPDATE: Guess not. Would have been logical but doesn't happen.
Maybe set AutoOpenTables to .F. , then in Form.Load():
IF THIS.DataEnvironment.BeforeOpenTables()
THIS.DataEnvironment.OpenTables()
ELSE
RETURN .F.
ENDIF