Hi Ken!
Jan -
I think this question ties in with the other one that you asked subsequently
regarding how to have a label know which form had opened the form on which
the label is located? Is that approach taking the place of this one? This
seems to be similar in concept...and the idea that I'd given re: the tag
might be the way to go.
In answer to you question above, to a degree, yes. However, it is not the
same question, the difference is that the other post is in regards to how
the series of labels on each form are assigned the name of a form that is
opened during the navigation process to the last form opened. Each label
will assume the name of each successive form opened, which will produce a
visual trail of all the forms that were opened to get to the target (last)
form. Thus, when the user no longer needs to use the current form, they can
click on any one of the labels in the footer, and it will close out any open
forms, including the current one, and take them directly back to the form in
the label they clicked on. They can then jump from one function menu to
another much faster, or return to any form in the original process to
perform another step in the current function. That is what *that* one is
about.
Before I get further into this, can you clarify for me the above? And if
it's different, then let me ask another question....the labels of which you
write are all on one form, and it's the "last" form that has been opened?
How does the form know how many labels to have on it -- how does it know how
many forms were opened already before it was?
This post is in regards as to how, when the user clicks on the label that
already displays the name of the form assigned to it to go to another form
or function, any open forms in the select group that might still be open,
including the current form, will be closed when the form name in a label is
clicked and opened or returned to.
Let me try to put it another way;
Main Menu > Label 1 (will display this name)
Wayside Insp. Menu > Label 2 (will display this name)
Switch Inspections Filter > Label 3 (will display this name)
Switch Inspection Records > Label 4 (will display this name)
Each of these labels are set up across the footer of each target (last)
form.
To open the form: - Ref the other post:
As each form is opened in the navigation process, each label will
automatically be assigned the name of each form as it is opened in the
process to the target (last) form. The last form opened will not need to be
listed in the trail. It is the target form of the navigation steps. The
labels are not visible on the form until activated by receiving the name of
the form in its line of progress. Example, label 3 will not be visible until
the 3rd form in the process is opened and it assumes the name of the 3rd
form opened. When the next form is opened, form no. 4, then the 4th label
on the form will become visible when it assumes the name of the 4th form
opened, etc.
To close the form - Ref this post:
The user clicks on one of the labels to go to the form name displayed in the
label, and all other forms involved in the navigation process are
automatically closed, including the last form.
What I am trying to do is find a way to close all the other open forms when
the label with a form name is clicked to jump to that form. A generic macro
or code that will close any open forms within a select group of forms that
will be part of the navigation processes for the various functions to be
performed. The user must walk in, step by step..with each step represented
by each one of the labels in the footer of the end (target) form...but, the
user can jump out to any previous location by clicking on any one of the
labels.
Now to this part of your question:
How does the form know how many labels to have on it -- how does it know how
many forms were opened already before it was?
I don't know yet. ;-)) I may be totally off the board here, because I have
never done anything like this before, and I am not that experienced with
Access to know for sure, but, the target form itself should not care about
the other forms, as the actions will involve only the labels on it's footer,
and other than close the form when the user jumps to another form, the
current form will not be impacted in any way by the activities taking place
with the labels. There is no function with the labels that will control any
functions of the form, except to close it. Once the form is closed, the
labels are invisible again. Plus, each form involved with have the required
number of labels placed in the footers. Most will have 4 labels, a few will
have six. Each label will represent a form in the steps necessary to open
the last (target form).
Additionally, I don't *think* you can define a specific button or control in
the process, as there are several buttons on a filter form that can open the
same form to display different information, and the user will not return to
a button, but to a form. However, OTOH, hold it, wait a minute... this
*may* be the case, as, even though various buttons can be used to open the
same form, they are all on the same form, and they all have unique names.
So, let's say, button cmdDept on the filter form is used to open the form,
then the name of the form will still be shown in the label on the opened
form, but, the button name may have been used by the macro to find the name
of the filter form to put in the label. Yes? No?
I truly am sorry this is a bit long, but, it is very complicated and
complex, at least for me, and I am trying to explain as best I can. I don't
have all the fine tuning of the how's and where's lined out yet, as they are
beyond my abilities. But, I know the end result I am looking for is doable.
Maybe not in the manner I am heading at this time, but, I am doing some
s'posing on some of this, sampling, testing theories and various
possibilities, and perhaps a macro is not the right way to go. The other
post and this one are part of an over all event, but, with different
processes and procedures, perhaps requiring different handling. Sorry, I
just wasn't sure where I should post it not knowing what might be needed.
I hope this is clear enough for you to undertand what I am aattempting to
do. I apologize for not explaining in a more detailed or concise manner.
Thank you very much for your time and assistance, I truly appreciate it.
Jan