Hi All
I was wondering if its possible to enable/disable the controls of another form(Form2) from one form(Form1)? Form2 is opened already and upon form2,form1 is loaded.As I have used the following lines of code on the exit button of one form(Form1):
But it doesn't work. I am not sure if we can make the controls of one form empty,enabled or disabled from another form using vba. I know we can do this if form2 is closed and we can write the code in the form_load event of form2. But in my case form2 is already opened and when we press a button then form1 gets loaded. Now if I press exit button on form1 then I want to disable/enable the controls of form2 which is already opened.
I hope anyone can help me in this.
Thanks
Aman
I was wondering if its possible to enable/disable the controls of another form(Form2) from one form(Form1)? Form2 is opened already and upon form2,form1 is loaded.As I have used the following lines of code on the exit button of one form(Form1):
Code:
forms!form2!text3.enabled=false
docmd.close acform,me.name
But it doesn't work. I am not sure if we can make the controls of one form empty,enabled or disabled from another form using vba. I know we can do this if form2 is closed and we can write the code in the form_load event of form2. But in my case form2 is already opened and when we press a button then form1 gets loaded. Now if I press exit button on form1 then I want to disable/enable the controls of form2 which is already opened.
I hope anyone can help me in this.
Thanks
Aman
Last edited: