order of forms

L

Loralee

I'm having problems with the order forms are appearing on the screen. As I
open and close them I'm expecting them to be in the order they were called
in, with the most recently called on top. But instead, the main form (first
one opened) is coming up in between other forms.

I have a main menu which launches several series of forms. Example:
fmnuMain launches formA (a submenu), formA launches formB (a dialog form)
and closes itself, so I am left with frmB open on top and fmnuMain behind
it. Then if I open another form, frmC, (from formB) and work with it, then
close formC, frmnMain is "on top". I want to be able to close formC and have
formB right there "on top". Then re-open and close formC multiple times.
(formC refreshes the recordset on formB, so I don't really want to close
formB and fromB's recordset is built by user's selection on the dialog formA).

I have tried using the pop-up property- but that lasts as long as the form
is open. I've tried making the fmnu invisible (forms!fmnuMain.visible =
true- did I do it correctly?) and it still came up between the forms. I've
checked my code on fmnuMain several times to confirm there is no activity I
am causing that makes it reappear when not expected.

I also tried passing the name of formB to formC via openargs, then using
that to make visibie, refresh or requery or make frmB the next one.

I put this in the click event in frmB that launches frmC:

strCalledMe = me.name '- placed indocmd.openform "frmC",,,,strcalledme

THen in the click that closes frmC I tried:
forms!strcalledme.visible = true
and got an error saying access cannot find the form strCalledMe in the forms
collection

There are 4 series of forms that can lead to frmC. 3 of them involve
dialogs for the user to filter recordsets and they are all different.
(subforms and tab controls will not work here).

1) I am looking for a way to control when a form appears on the screen. I
want frmB to appear when frmC closes. Working in A2K. THere will be 6
users. I am not using the "wizards". All forms are scratchbuilt.

Thank you in advance-
 
L

Loralee

Just tried that in the button of frmC. The main menu (fmnuMain) is still on
top and the form I want on top (frmB) is behind it. ( Also added me.visible
= false to the button on frmB that launches frmC)

Is there a means to set the focus onto frmB from formC, so that (maybe) it
will force it where I want it?
Are there other properties I should double check on fmnuMain that may be
causing this?
 
L

Loralee

Got the immediate problem solved.....I had a rogue "forms!fmnuMain.visible =
false" in the load of frmC. When I removed it things started loading better.

One question, though. What is the difference between calling a form from
the collection using Forms!frmName.property/controlname and the way you were
doing it?
(forms(formname).property?
 
L

Loralee

Thanks, Jim. I do have one dialog form as modal, but it gets closed once it
does it's work (it creates the SQL for the next form). This form after the
modal form (which I am referring to as frmB) is a "tickler" for a casemanager
or other worker to manage their patients, and the form they finally open (and
later toggle between formB and formc) is a patient form. This form then
refreshes the recordset in the tickler (frmB) based on what the casemanager
just did for the patient. That's why it needs to remain open and out of the
way. At the moment it is working smoothly....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top