By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,750 Members | 1,367 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,750 IT Pros & Developers. It's quick & easy.

Navigate between open windows? (opinion)

P: n/a
Do you have your users rely on the windows taskbar to manage/navigate
between the forms they have open, or do you provide another (more
robust) method? Does anyone use a custom navigation system (like
keeping a selectable list of open forms in a listbox/commandbar/
breadcrumb trail etc.)?

Mar 7 '07 #1
Share this Question
Share on Google+
13 Replies


P: n/a
On Mar 7, 5:21 pm, "robert.waters" <robert.wat...@gmail.comwrote:
Do you have your users rely on the windows taskbar to manage/navigate
between the forms they have open, or do you provide another (more
robust) method? Does anyone use a custom navigation system (like
keeping a selectable list of open forms in a listbox/commandbar/
breadcrumb trail etc.)?

I used one that was written by Dev Ashish, but damned if I can find a
link to it anymore. It requires placing a 'Window' menu item on a
custom toolbar and it adds open forms and reports to it when you click
on it.

Perhaps someone out there knows where it's hidden, otherwise I'll look
for it when I get home.

Mar 7 '07 #2

P: n/a
On Mar 7, 6:22 pm, "storrboy" <storr...@sympatico.cawrote:
On Mar 7, 5:21 pm, "robert.waters" <robert.wat...@gmail.comwrote:
Do you have your users rely on the windows taskbar to manage/navigate
between the forms they have open, or do you provide another (more
robust) method? Does anyone use a custom navigation system (like
keeping a selectable list of open forms in a listbox/commandbar/
breadcrumb trail etc.)?

I used one that was written by Dev Ashish, but damned if I can find a
link to it anymore. It requires placing a 'Window' menu item on a
custom toolbar and it adds open forms and reports to it when you click
on it.

Perhaps someone out there knows where it's hidden, otherwise I'll look
for it when I get home.
Found it here:
http://groups.google.com/group/comp....3915e2db50ad57
Thanks!!! This is perfect.

Mar 8 '07 #3

P: n/a
On Mar 8, 12:14 pm, "robert.waters" <robert.wat...@gmail.comwrote:
On Mar 7, 6:22 pm, "storrboy" <storr...@sympatico.cawrote:
On Mar 7, 5:21 pm, "robert.waters" <robert.wat...@gmail.comwrote:
Do you have your users rely on the windows taskbar to manage/navigate
between the forms they have open, or do you provide another (more
robust) method? Does anyone use a custom navigation system (like
keeping a selectable list of open forms in a listbox/commandbar/
breadcrumb trail etc.)?
I used one that was written by Dev Ashish, but damned if I can find a
link to it anymore. It requires placing a 'Window' menu item on a
custom toolbar and it adds open forms and reports to it when you click
on it.
Perhaps someone out there knows where it's hidden, otherwise I'll look
for it when I get home.

Found it here:http://groups.google.com/group/comp..../browse_thread...
Thanks!!! This is perfect.
How did you implement it? The code as-is requires that form open and
close events call a function ('UpdateMenu') that iterates through open
windows in the MDI client area and populates a menu bar; in order to
do this, it makes use of Terry Kreft's MDIWindowsZ() function, which
gets the "Z order of open non-modal Forms". Unfortunately, this
function will only return windows having a window style of visible; in
my Access 2003, all the form open events (open/load/resize/activate/
current) occur before the window is actually visible, so each form
fails the test and is not included in the list that populates the
menu.
Here is the code:
strClassName = fGetClassName(hWndChildAfter)
lngStyle = apiGetWindowLong(hWndChildAfter, mcGWLSTYLE)
If (strClassName = "OForm" Or strClassName = "OReport") And
(lngStyle And mcWSVISIBLE) Then
.. add to the list

I can make the code work if I remove the '(lngStyle And mcWSVISIBLE) '
check, but my production database makes use of hidden forms for saving
state information, so that workaround is not viable.
Am I going to have to coopt the event handlers of some object on each
form that isn't loaded until after the form is visible? That seems
quite hack-ish.

Any help would be appreciated.

Mar 8 '07 #4

P: n/a
On Mar 8, 12:14 pm, "robert.waters" <robert.wat...@gmail.comwrote:
On Mar 7, 6:22 pm, "storrboy" <storr...@sympatico.cawrote:
On Mar 7, 5:21 pm, "robert.waters" <robert.wat...@gmail.comwrote:
Do you have your users rely on the windows taskbar to manage/navigate
between the forms they have open, or do you provide another (more
robust) method? Does anyone use a custom navigation system (like
keeping a selectable list of open forms in a listbox/commandbar/
breadcrumb trail etc.)?
I used one that was written by Dev Ashish, but damned if I can find a
link to it anymore. It requires placing a 'Window' menu item on a
custom toolbar and it adds open forms and reports to it when you click
on it.
Perhaps someone out there knows where it's hidden, otherwise I'll look
for it when I get home.

Found it here:http://groups.google.com/group/comp..../browse_thread...
Thanks!!! This is perfect.
My apologies. It seems that simply setting the form's Visible
property to True, in any of the Load events, before the call to
UpdateMenu, works (and vice-versa for the Close events).
Now that's one ugly hack.

Mar 8 '07 #5

P: n/a
My apologies. It seems that simply setting the form's Visible
property to True, in any of the Load events, before the call to
UpdateMenu, works (and vice-versa for the Close events).
Now that's one ugly hack.

I haven't looked at what you got, but the one I used enumerated the
forms/reports and added them to the menu when you clicked on the
'Windows' menuitem that you create in a custom toolbar. Opening the
forms has nothing to do with it in my version. Are you sure you read
through it properly?

Mar 8 '07 #6

P: n/a
On Mar 8, 1:10 pm, "storrboy" <storr...@sympatico.cawrote:
My apologies. It seems that simply setting the form's Visible
property to True, in any of the Load events, before the call to
UpdateMenu, works (and vice-versa for the Close events).
Now that's one ugly hack.

I haven't looked at what you got, but the one I used enumerated the
forms/reports and added them to the menu when you clicked on the
'Windows' menuitem that you create in a custom toolbar. Opening the
forms has nothing to do with it in my version. Are you sure you read
through it properly?
I guess it was different code (or the same, modified).
Did your users notice a delay when clicking that 'Windows' menu item?
I wonder if it's faster to have it populated on form open/close
events, or when the menu item is selected?

Mar 8 '07 #7

P: n/a

I can send you the one I have. I don't think it will paste properly
into a reply.
I've never noticed any speed issues, but most things I've done with
it, users would rarely have more than 10 windows open at a time.

Mar 8 '07 #8

P: n/a
On Mar 8, 1:50 pm, "storrboy" <storr...@sympatico.cawrote:
I can send you the one I have. I don't think it will paste properly
into a reply.
I've never noticed any speed issues, but most things I've done with
it, users would rarely have more than 10 windows open at a time.
Would you? I'll test the speed in my app. I really don't want to
have to go and add code to every one of 50 or so forms' onload and
onclose events ;)
My email address is robert(dot]waters[at)gmail.com

Mar 8 '07 #9

P: n/a

Done

Mar 8 '07 #10

P: n/a
Hello everyone,

This seemed like such a great idea because my users all have 15
forms open at once.

I wrote this code this morning. Let me know if I have done
something dangerous.

This is all in a form called "** Forms **" so we can find it
easily on the launch bar.

You open this form and then click on the Form you want to jump
to.

Tim Reed

' ************************************************
' Get list of open forms
Private Sub Form_Activate()

GetOpenFormsList

End Sub
' ************************************************** *********
' Make a list of all open forms excluding this one
Private Sub GetOpenFormsList()

Dim obj As AccessObject, dbs As Object
Dim OpenFormName As String

DoCmd.SetWarnings False
DoCmd.RunSQL "DELETE FROM [Open Forms List];"
Set dbs = Application.CurrentProject
For Each obj In dbs.AllForms
If (obj.IsLoaded) Then
OpenFormName = obj.Name
If (OpenFormName <"** Forms **") Then
SQL1 = "INSERT INTO [Open Forms List] "
SQL2 = "( [Form Name] ) VALUES ( '" & OpenFormName &
"' );"
DoCmd.RunSQL SQL1 & SQL2
End If
End If
Next obj
SQL1 = "SELECT * FROM [Open Forms List] "
SQL2 = "ORDER BY [Form Name];"
Me.RecordSource = SQL1 & SQL2

End Sub
' *****************************************
' Jump to the clicked Form
Private Sub FormNameList_Click()

Dim stDocName As String, stLinkCriteria As String

stDocName = Me.FormNameList
DoCmd.OpenForm stDocName, , , stLinkCriteria

End Sub

Mar 9 '07 #11

P: n/a

Without testing it, the two things I see are.. that I would not
attempt to open the form when clicked in the list. If the form is
already open, attempt to SetFocus or Restore. Mainly because it is
possible to have a form open more than once (multiple instances). So
if this code were to be re-used, it may not work. Also there are times
when certain criteria or events must take place before or during a
form opening. These may be prevented using your current method.

Second, will this code include reports being previewed?

Mar 9 '07 #12

P: n/a
storrboy wrote:
I can send you the one I have. I don't think it will paste properly
into a reply.
I've never noticed any speed issues, but most things I've done with
it, users would rarely have more than 10 windows open at a time.
I've had this for years as an option on the main toolbar. A list that
floats in the upper right showing all open forms and you can click on a name
to bring that form to the front. I have never once seen a user utilizing
it.

(Hey, I thought it was a good idea)
--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Mar 9 '07 #13

P: n/a

We used the menu I mentioned because two of the apps we made allowed
multiple instances of a form (Documents and Records). The same form
could be open many times with different records in them. Made sense
for us as the menu would allow locating and moving between them easier.

Mar 9 '07 #14

This discussion thread is closed

Replies have been disabled for this discussion.