Yes, most definitely - however, the request is not to
have a list box so I had to do it this way. The form that will open
up by clicking on the data selected in the subform will be editable.
The editability of the detail form (or subform) isn't dependent on
whether the summary list is presented in a list box or a subform. It
would be simpler to do this with a list box, because a list box has a
value, while a subform doesn't; however, if you have been told you
can't use a list box, a subform can be made to work. On the other hand,
if the only requirement is that the *detail* subform must be editable,
let me know so we can do it the easy way.
YES, I
would like it to display to the right of the first subform after a
particular record is clicked on.
Okay. That's a different arrangement from my original understanding,
but no big deal.
Okay, but is there a way to do that without the
f_PrimaryEntry showing until a record was selected?
I think so. It should just be a matter of hiding the details subform
until the user clicks on the list subform.
Here's the way I would do it, based on the idea that the list must be
presented in a subform. As I said above, if a list box can be used
instead, the whole thing is simpler, so get back to me on that.
Place both subforms on the main form. Verify the names of the subform
controls -- for now, I'll assume that the name of the details subform
control will be "f_PrimaryEntry", the same as the form object it will
display. Set the Visible property of the subform *control* to False.
Put a text box somewhere on the main form, and set its Visible property
to False. Set its ControlSource property to
=[BU_CJ].[Form]![Budget Unit]
Set the name of this text box to "txtBudgetUnit". This text box, though
unseen by the user because it isn't visible, will reflect whatever is in
the [Budget Unit] text box on the subform named "BU_CJ". Check the name
of that subform control, by the way, to make sure it's right. Youi're
the one who gave me that name for the list subform.
For the f_PrimaryEntry subform control, set the Link Master Fields
property to
txtBudgetUnit
Set the Link Child Fields property to
UC_grp_name
That's all you need to do to get the details subform (f_PrimaryEntry) to
track the current record in the list subform (BU_CJ). The only thing
left to do is make the details subform visible in the Click event of the
BU_CJ *form object*. Click on the subform control for BU_CJ, then click
on it again to select the form object itself, then bring up the property
sheet for that form, go to the Event tab, choose [Event Procedure] for
the On Click property, then click the build button at the end of the
line and build this event procedure:
Private Sub Form_Click()
Me.Parent!f_PrimaryEntry.Visible = True
End Sub
And that ought to do it (barring any name mixups).
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)