>Have a form using Private Data Session.
>One or more tables need to have exclusive access.
>
>In DE.BeforeOpenTables I'd like to check to see if any of these are in use in any other datasession.
>
>IF USED('table1') won't do it.
>
>How can I accomplish this check?
>
>TIA, Kim
You can set Exclusive property and try to open tables in code:
1. AutoOpenTables=.f. in dataenvironment design sheet.
2. Thisform.dataenvironment.Opentables() in Form.Init. This line should trap error "Access is denied" (check error number in Help), and if error trapped you can return .f. from Init, i.e. unload form or do something else.
Edward Pikman
Independent Consultant