Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / January 2007

Tip: Looking for answers? Try searching our database.

order of forms

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Loralee - 01 Jan 2007 15:34 GMT
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-

Signature

Loralee

Douglas J. Steele - 01 Jan 2007 15:51 GMT
Assuming the form is open, use

forms(strcalledme).visible = true

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)

> I'm having problems with the order forms are appearing on the screen.  As
> I
[quoted text clipped - 46 lines]
>
> Thank you in advance-
Loralee - 01 Jan 2007 16:35 GMT
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?
Signature

Loralee

> Assuming the form is open, use
>
[quoted text clipped - 50 lines]
> >
> > Thank you in advance-
Loralee - 01 Jan 2007 19:03 GMT
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?
Signature

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
[quoted text clipped - 59 lines]
> > >
> > > Thank you in advance-
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.