J
Jan Il
Hi all -
I have two questions. I have a series of functions where I simply want to;
1. Contact/call a specific control on a specific form.
1. From a specific form when it is opened.
3. Display the name of the contacting/calling form in the specific control
Caption when the specific form it is on is opened.
All controls on all the end/target forms have the same generic names. I have
been playing with this for some time, and trying to figure out how to get
each control to call the name of the related form into it when the
end/target form is opened, when there are various forms involved in the
process of reaching the end/target form and will vary from function to
function. I have given
considerable thought to this process, and it occurs to me that trying to
have the controls call a specific form from among all the various forms,
which can not be determined until the form is opened, is actually backwards.
It seems to me that the process should be the other way around, from the
/form/ to the control. I may be all wet here in my thinking, and it won't be
the first time, but, it seems like it would make more sense. Here's why;
Since the controls on the forms will all be the same generic series of
names, it will be much easier and reasonable to have the various primary
forms contact a specific control in an end/target form, as that control name
will always be known. Each form will always have it's own target/end form
control, the control it will be displayed in when the target/end form is
open. Each form then could be coded to contact their specific control on a
specific form such as;
Form: Main Menu to Form: Wayside Inspection Form control lblControl1. Then
when the Wayside Inspection Form is subsequently opened at the end of the
navigation process, the name of the form Main Manu will be displayed in the
control lblControl1. The next form in the navigation series, Wayside
Inspection Menu would then contact Form: Wayside Inspection Form control
lblControl2, and when the form is opened, the name Wayside Inspection Menu
would be displayed in the control lblControl2.
Question 1: Can this be done?
Question 2: What would be the best method to accomplish this function, Macro
or VBA?
I would truly appreciate any suggestions or references. Hopefully, I have
explained it in a manner that will make some sense.
Best regards,
Jan
I have two questions. I have a series of functions where I simply want to;
1. Contact/call a specific control on a specific form.
1. From a specific form when it is opened.
3. Display the name of the contacting/calling form in the specific control
Caption when the specific form it is on is opened.
All controls on all the end/target forms have the same generic names. I have
been playing with this for some time, and trying to figure out how to get
each control to call the name of the related form into it when the
end/target form is opened, when there are various forms involved in the
process of reaching the end/target form and will vary from function to
function. I have given
considerable thought to this process, and it occurs to me that trying to
have the controls call a specific form from among all the various forms,
which can not be determined until the form is opened, is actually backwards.
It seems to me that the process should be the other way around, from the
/form/ to the control. I may be all wet here in my thinking, and it won't be
the first time, but, it seems like it would make more sense. Here's why;
Since the controls on the forms will all be the same generic series of
names, it will be much easier and reasonable to have the various primary
forms contact a specific control in an end/target form, as that control name
will always be known. Each form will always have it's own target/end form
control, the control it will be displayed in when the target/end form is
open. Each form then could be coded to contact their specific control on a
specific form such as;
Form: Main Menu to Form: Wayside Inspection Form control lblControl1. Then
when the Wayside Inspection Form is subsequently opened at the end of the
navigation process, the name of the form Main Manu will be displayed in the
control lblControl1. The next form in the navigation series, Wayside
Inspection Menu would then contact Form: Wayside Inspection Form control
lblControl2, and when the form is opened, the name Wayside Inspection Menu
would be displayed in the control lblControl2.
Question 1: Can this be done?
Question 2: What would be the best method to accomplish this function, Macro
or VBA?
I would truly appreciate any suggestions or references. Hopefully, I have
explained it in a manner that will make some sense.
Best regards,
Jan