Terminology problem: a pop-up form is quite a different thing than a subform
control with a form displayed in it. A pop-up form is a separate form, which
is modal... must be responded to before anything else can be done.
From your statement, it seems you simply want to change what is displayed in
the subform control. And, I told you what to do... when you say "option",
are you talking about buttons in an option group?
If so, clicking a button will set a numeric value... let's assume you have
four option buttons in an option group, named grpChoose, and the values they
return are 1,2,4, or 8. On the same form, you have a Subform control named
sbfChangeable, initially set with a SourceObject of "frmSelectedWhite" and,
just so you can be sure about the number, a text box named txtValue. And you
have forms named frmSelectedBlue, frmSelectedGreen, frmSelectedOrange,
frmSelectedRed, and frmSelectedWhite, for each of which you have set the
Backcolor of the Detail Section to the color used in the form's name.
In the After Update event for grpChoose, use the following code
Select Case Me!grpChoose
Case 1
Me.txtValue = 1
Me.sbfChangeable.SourceObject = "frmSelectedBlue"
Case 2
Me.txtValue = 2
Me.sbfChangeable.SourceObject = "frmSelectedGreen"
Case 4
Me.txtValue = 4
Me.sbfChangeable.SourceObject = "frmSelectedOrange"
Case 8
Me.txtValue = 8
Me.sbfChangeable.SourceObject = "frmSelectedRed"
Case Else
Me.txtValue = Me.grpChoose
Me.sbfChangeable.SourceObject = "frmSelectedWhite"
End Select
Just to make sure, I created this, and it worked for me. (I think I misspoke
in my earlier reply and used "SourceForm" instead of the correct
"SourceObject".
Larry Linson
Microsoft Office Access MVP