Open forms in single 'tab control' window

G

Guest

Hi,

I have got forms and subforms created for my application. Several forms have
command buttons which open yet other sub-forms, however, each form opens in a
new window whether the main ones or subforms.

To make a better interface, is it possible that whenever one clicks on a
command button, it opens the form in a 'tab control' window. Not to confuse
the tab control for tabbing as I want to use only 1 tab control window only
because it looks neaterto have my forms open in there.

So in all, it's like having a menu of command buttons now that I have made
and when you click on those buttons, they open the forms. Is there a way when
I click on any button, the related form opens in the tabbed window instead.
And the subforms again open in the same window and I can add a back/forward
button at the top to move in between, much like web browser.

I am willing to work out the solution and it would be great help to have
some tips in this regard.
 
G

George Nicholson

Yes, it is possible to do this.

All of my apps use some variation of this for "list maintenance" if nothing
else. (i.e., maintaining "static" lookup tables that require an interface,
but nothing special).
- Each table has a generic form.
- I have a Crossref table that lists the "friendly" name and the actual form
name
- On one tab I have a listbox and a subform control.
- The listbox displays the Friendly form names, but also contains the actual
form name in a hidden column.
- When a selection is made in the listbox, I grab the actual form name and
assign it to the SourceObject of a subform control on the same tab
-(the tab also has a button that will toggle the currently displayed form
between Form and Datasheet views)

Advantage of using a crossref table and listbox rather than a series of
command buttons is that its easier to maintain (IMO). The addition of a new
lookup table means just creating a form and an additional Crossref entry, no
need to touch the "maintenance" interface. In addition, if you have some
"read-only" data, you can add a field to the crossref table to indicate that
the form shouldn't allow edits or adds when displayed, etc.

I also have a "Rebuild?" checkbox field in tblTableCrossref that determines
whether my CreateGenericForm code creates/replaces that form, so I can
generate or regenerate either a single or full set of simple maintenance
forms, in a snap (a godsend when that 1st deliverable deadline is
approaching and other things demand your attention).
 
G

Guest

That seems to guide but have question again:

:

- When a selection is made in the listbox, I grab the actual form name and
assign it to the SourceObject of a subform control on the same tab

How do you assign SourceObject dynamically? I know we can specify a form in
the Subform Source Object property and it works fine to display that form
only.

I have to use command buttons, instead of list box, so wouldn't go with the
crossref table, it's the way application must work.

Many Thanks
Navin
 

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

Top