Unanswered: Calling one forrm's event from another form
Well, I am stuck again. Although I do believe the answer to my problem has to be easy, but I am not able to find any good resource to help me. I have two question that I can't get the answers for.
Q1. Is it possible to access another forms variables. For example I would like to set form1's Boolean variable to true from form2. So when control returns to form1, the Boolean variable can be evaluated.
Q2. It is possible to call a form's function or sub procedure from another form. For example calling the click event of a control that is located on form1 from form2.
Note in the examples form2 is not a subform. Also I am coding in Access 97. I was thinking that these questions should be pretty basic, but when I was having trouble finding any information for it. I began to think that maybe it was so basic everyone already knows how to do it. So if anyone can just fill me in please. I would appreciate it so much.
Q1--not that I know of, but there are simple ways to accomplish what you want to do. Why don't you just create hidden fields on the forms and, instead of assigning values to variable, assign values to those controls. Then, from the other form, instead of refering to the variable, just refer to the control.
Q2--You can call another form's subroutine. Use the following syntax:
where Project is the name of the project, as stored in the TOOLS>>OPTIONS>>ADVANCED>>Project Name menubar item.
Form_Form1 is the name of your form's code module (this is always in the form Form_ appended with the name of the form).
test is the name of your subroutine.
In order to access the subroutine from somewhere other than its originating form, you will need to recast the subroutine from Private, to Public.