CONTENTS:

MULTISCR.ZIP
-------------
	MULTISCR.TXT
	MULTISCR.MDB

Lynn Shanklin [MSFT] 73322,666 answered my query and put me on the
right track for solving the problem of driving multiple forms from
one option group without getting in an accident.

Problem: 
You want to allow the user to move immediately from any 
one of seven possible screens (representing completely
different datasets) to any other screen, by means of
great big command buttons. You don't want to hard-code
every blamegoned command button for every combination of opening
and closing.

Lynn recommended I try the ActiveForm property, so I studied up on it
and came up with this little ditty.  Thanks, Lynn!


The MDB consists of:

- Seven forms each containing an Option Group offering seven
  command buttons (Values 1-7).

Each Form has the following function statement as the On Update
property of the Option Group containing the command buttons:

=CloseForm([optiongroupcontrolname])

The value returned will be the basis of a Select Case statement
in the module below.

'Written 1994 by John A. Stilwell [100014,1126], Share and Share Alike

-----------------------------------
Function CloseForm (n)
-----------------------------------
Dim DB As Database

Dim FormToBeOpened As String
Dim CurrentFormToBeClosed As String

Set DB = CurrentDB() 

    Select Case (n)
    Case 1:
        FormToBeOpened = "Form1"
    Case 2:
        FormToBeOpened = "Form2"
    Case 3:
        FormToBeOpened = "Form3"
    Case 4:
        FormToBeOpened = "Form4"
    Case 5
        FormToBeOpened = "Form5"
    Case 6:
        FormToBeOpened = "Form6"
    Case 7:
        FormToBeOpened = "Form7"
    End Select

CurrentFormToBeClosed = Screen.ActiveForm.FormName
    Debug.Print "Close: " & CurrentFormToBeClosed
    Debug.Print "Open: " & FormToBeOpened
    DoCmd Close A_FORM, CurrentFormToBeClosed

DoCmd OpenForm FormToBeOpened

End Function

----------------------------------------------

I had attempted nesting seven subforms within one large form with
one option group for all of the subforms, but that's pretty messy
when you are changing complete datasets.  RECSRC.MDB (Forms Library)
works fine switching back and forth among datasets, but my datasets
are not identical in structure, so I had to find a way to approximate
the user-friendliness of RECSRC.MDB without getting error messages that
result from trying to manipulate data on a subform that is not linked
by a primary key to a parent form.

I hope this helps others, and I welcome any suggestions.

John Stilwell