listing open forms and reports

  • Thread starter Thread starter gmenon100 via AccessMonster.com
  • Start date Start date
G

gmenon100 via AccessMonster.com

Hi Friend's,

I have an access database project with SQL backend. Most of which is
completed. I wanted to add a navigaton bar which would list all open forms
and reports. Clicking item on this list would make the concerned form or
report active.

I dont know whether this is possible, but would certainly appreciate any
response if reference is available for what i need.

Thanks in advance

Gmenon
 
Hi Gmenon,

Yes, it's possible. You seem to wish to mimic the windows' task bar. I can
think of many ways of doing this but the critical thing is to compile a list
of loaded forms (and reports?) and keep this list up-to-date.

If you want to do a one-time survey of the application then I suggest you
read through the AllForms (AllReports) collection that is a member of the
CurrentProject object and test each form's IsLoaded property. However this
only provides a snapshot whereas users can load and close forms at will
throughout the session.

So you need a flexible 'container' into which you can place a form's details
(name) when it is loaded and from which you can remove the details when it is
closed, remembering to update your visible control each time such an event
occurs. Two such 'containers' suggest themselves: a collection and a table.
(Hm! Also maybe directly into the rows of your combo box or list box? Bit
messy but perfectly feasible.)

If you are not familiar with objects then ignore the collection route and
concentrate on a table based solution. Anyway tables are very easy to bind
to combo boxes, list boxes or continuous forms and the controls or forms
themselves are easy to requery.

OK the strategy is:

Bind your visible control to the table.
Every time a form is loaded, add a record to your table and requery your
control.
Every time a form is closed, delete the appropriate record from your table
and requery your control.
When a user clicks on a row (or highlights the rows and presses the required
key combination) activate the appropriate form. (Your list needs to be modal
so that it is always on top.)

Personally I would have only two attributes in my table: ObjectRef and
FormName. ObjectRef is a long integer and holds the object reference of the
form in question. Capture this value by using something like SET ObjectRef =
Me in the OnLoad event of the form.

Sorry this has turned out to be more confused than planned as I thought of
more and more things as I was writing. Make some more decisions as to how
you want this to work and look and we can explore the solution in more detail.

Regards,

Rod
 
Arghhh! I'm always doing this! Before somebody else corrects me modal means
the form retains the focus until closed. This is not what you want!

Set the border style to Thin and make the form PopUp. This keeps it on top.
You may also want to investigate locking the form into one corner of the
screen.

Rod
 
Hi Rod,

First let me thank you for the time you took to respond to my posting. I was
out of town and will try all permutations and combinations.

Thanks.

Gmenon


Rod said:
Arghhh! I'm always doing this! Before somebody else corrects me modal means
the form retains the focus until closed. This is not what you want!

Set the border style to Thin and make the form PopUp. This keeps it on top.
You may also want to investigate locking the form into one corner of the
screen.

Rod
Hi Friend's,
[quoted text clipped - 9 lines]
 

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

Back
Top