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 / Forms Programming / May 2005

Tip: Looking for answers? Try searching our database.

Cycle through Open Forms

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David W - 26 Apr 2005 17:17 GMT
I am using
For intX = intCount To 0 Step -1
        If Forms(intX).name <> "excessidle" Then
               If Forms(intX).name <> "welcome" Then
                    i = Forms!welcome.lug
                   Forms!welcome("ham" & i) = Forms(intX).name
                   Forms!welcome.lug = Forms!welcome.lug + 1
                   DoCmd.Close acForm, Forms(intX).name, acSaveYes
               End If
           End If
   Next
to cycle through open forms and close them when excessive idle time is
detected, then my program loggouts the current user. I have put a series of
text boxes on the main form to catch any open forms names so that when they
log back in, I can open the forms they had previously been in.
When this procedure steps through each open form I noticed that 99% of the
forms were listed twice.
Is there a way to only list them once?
Michel Walsh - 09 May 2005 20:32 GMT
Hi,

   I haven't try myself, but can you add a DoEvents after the DoCmd. I
suspect a *possible* multi-thread timing problem between the VBA thread of
execution and the possible DoCmd execution (don't take it for cash, it is
only speculations).

Vanderghast, Access MVP

>I am using
> For intX = intCount To 0 Step -1
[quoted text clipped - 14 lines]
> forms were listed twice.
> Is there a way to only list them once?
 
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.