>Thanks for the help..
>
>sorry for not explaining in enough detail.
>
>what i did was that i created a form class to display table
>contents in a gridview. But before creating a new form,
>in the form's load() event-handler, i want to make sure
>there isn't another form that is opened with the same table.
>and so i wanted a way to loop through all the forms in the
>application to find out.
>
>So far i've been having trouble accessing the forms collection
>stored in teh _SCREEN object. The Foxpro interpreter
>kept on complaining about illegal access (error #11)
>
>and oh.. i am using visual foxpro 5.0
>
>thanks for the help
>really appreciate it :)
>
>tian
Tian,
Error #11 is "invalid function, argument..." and I can't find an error as "Illegal access". If the first is correct, you probably using forms() collection parameters wrongly (ie: _screen.forms(1).name is chartype where _screen.forms(1).left is numeric). You would need something like :
for ix = 1 to _screen.formcount
nTables = aused(aTablesInUse,_screen.forms(ix).datasessionid)
endfor
Cetin