Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Help with SourceObject & Subform

0 views
Skip to first unread message

Silvio

unread,
Feb 25, 2009, 8:32:03 AM2/25/09
to
Back ground: I have a form with a subform in it. The main form works like a
side-menu bar to lunch different form in the subform. That is accomplished by
programmatically changing the subform “SourceObject” to the required forms.
Now I would like to take it one step further, I have some of these subforms
that have a “see detail” button in it. What that does, is to open a form for
the selected record and shows all that record details in a pup-up form. What
I would like to accomplish is to actually lunch that details form in my
subform by changing the SourceObject substitute the SUBFORM from products
list to product details and then have a button on the product details that
will bring you back to the product list (Web-like navigation process). Can it
be done?

The pieces of codes I have so far are:
To change the SourceObject from the main form
Me.[SubItems].[SourceObject] = "frmCalibTiming"


To open the view details in a separate form:
Dim strWhere As String
strWhere = "[ProductID]=" & Me![Product_ID]
DoCmd.OpenForm "frmEditCalibration", , , strWhere

I guess what I am trying to do is a combination of this codes. Any
step-by-step guide is appreciated.

Thank you,
Silvio

Jeanette Cunningham

unread,
Feb 25, 2009, 8:13:08 PM2/25/09
to
Hi Silvio,
an interesting idea.
If you save the ProductID from the product form somewhere on the main form,
I imagine that it would be easy to change the subform's source object to the
detail form and either use a filter for ProductID or build the entire
recordsource for the subform using a Where clause for the ProductID.

Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia


"Silvio" <Sil...@discussions.microsoft.com> wrote in message
news:B077AB63-3E6C-4CEE...@microsoft.com...

0 new messages