Hi all sorry to touch on this subject again but I am having problems getting this to work, have I missed something out?
My problem is my application has two main screens a diary and a client details screen, the two forms share some of the same tables within the data environment thus if the user was to open the diary form when the client form is open an error message appears saying there is a cyclic relationship. I was hoping to run this bit of code from the menu to close all current forms that may be open before opening the new form accessed from the menu.
* close all forms before opening the client details form else we will have a cyclic relationship between data of the forms
FOR EACH loForm IN _Screen.Forms
loForm.release
endfor
do form client
This code is not working, do I have to reference each form by name?? I have also tried the following:
FOR EACH loForm IN _Screen.Forms
do case
case lower(loForm.name) == "frmdiary"
loForm.release
case lower(loForm.name) == "frmappointments"
loForm.release
case lower(loForm.name) == "frmsearchclient"
loForm.release
endcase
endfor
do form client
If anyone has any ideas here I would appreciate the help
thanks
My problem is my application has two main screens a diary and a client details screen, the two forms share some of the same tables within the data environment thus if the user was to open the diary form when the client form is open an error message appears saying there is a cyclic relationship. I was hoping to run this bit of code from the menu to close all current forms that may be open before opening the new form accessed from the menu.
* close all forms before opening the client details form else we will have a cyclic relationship between data of the forms
FOR EACH loForm IN _Screen.Forms
loForm.release
endfor
do form client
This code is not working, do I have to reference each form by name?? I have also tried the following:
FOR EACH loForm IN _Screen.Forms
do case
case lower(loForm.name) == "frmdiary"
loForm.release
case lower(loForm.name) == "frmappointments"
loForm.release
case lower(loForm.name) == "frmsearchclient"
loForm.release
endcase
endfor
do form client
If anyone has any ideas here I would appreciate the help
thanks