Jumat, 08 Juli 2011

RE: [MS_AccessPros] Synchronizing a Form and Sub-Form (Access 2003 or 7)

Terry,

Sometimes you have to be smarter than Access and just type in the fields/controls used to link master/child. I often create main forms with no record source and use a control name in the Link Master property.

Duane Hookom
MS Access MVP

To: MS_Access_Professionals@yahoogroups.com
From: terryomsn@msn.com
Date: Fri, 8 Jul 2011 22:02:25 +0000
Subject: Re: [MS_AccessPros] Synchronizing a Form and Sub-Form (Access 2003 or 7)


Thanks, Bill.
I gave your suggestion a shot and looked at the sub-form's properties. Both the master and child properties were null. However, when trying to pull down values in either of the two properties, I received a "cannot build a link between unbound forms."
I'm wondering if Access is trying to tell me that query-based forms can't participate in the Master-Child linkage?
Terryomsn

--- In MS_Access_Professionals@yahoogroups.com, "Bill Mosca" <wrmosca@...> wrote:
>
> Terry
>
>
>
> Just to jump out there without doing too much effort <grin>...
>
> Have you made sure you sub form is linked to your main form?
>
> 1. Open the main form in design view.
>
> 2. Click on the sub form control and make sure the master and child links
> are set up properly.
>
>
>
> Regards,
>
> Bill Mosca,
>
> Founder, MS_Access_Professionals
>
> That'll do IT <http://www.thatlldoit.com/> http://thatlldoit.com
>
> MS Access MVP
>
> <http://mvp.support.microsoft.com/profile/Bill.Mosca>
> http://mvp.support.microsoft.com/profile/Bill.Mosca
>
>
>
>
>
> From: MS_Access_Professionals@yahoogroups.com
> [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Terry Olsen
> Sent: Thursday, July 07, 2011 6:22 PM
> To: MS_Access_Professionals@yahoogroups.com
> Subject: [MS_AccessPros] Synchronizing a Form and Sub-Form (Access 2003 or 7)
>
>
>
>
>
> I apologize in advance for the length of this message. I've been trying to get
> it work for a bit.
>
> Functionality Needed
> I need a form that will give me the ability to select a RunID; the form should
> have a sub-form that displays selected columns for all table2 records with
> TripID that also have a table1.RunID equal to the selected (from the combo on
> the form) RunID.
>
> Current Status
> I have the form working.
> I have the sub-form working.
> Currently, the form and sub-form are operating independently. I can select the
> RunID. The sub-form is displaying all records as there are no criteria being
> passed to the sub-form.
> What I don't know how to do is synchronize the sub-form query results for the
> combo box selected RunID from the form.
> I've found all Table 1 TripIDs with the same RunID by creating a query using the
> Query Design tool, and joining Table 2 to Table 1 by TripId and using a
> hard-coded RunID as a query criterion.
>
> Background Info
> Table 1 (tblCurrentRunsWithTripsFromXMLTransform)
> RunID - Number data type
> TripID - Number data type
> Table2 (tblCurrentOrcaXMLTrip)
> TripID - Number data type
> TripName - Text data type
> PeakFlag - Text data type
> PeakFare - Text data type
> Relationship
> Each Table1.RunID will have one or more Table2.TripIDs (not defined in
> Relationships).
> Each Table2.TripIDs has only one Table1TripID (defined in Relationships)
> The form contains only one Combo box that is populated by calling the
> qryCurrentDistinctRunsFromXMLTransform query.
> SELECT [qryCurrentDistinctRunsFromXMLTransform].[RunId] FROM
> qryCurrentDistinctRunsFromXMLTransform ORDER BY [RunId];
> The qryCurrentDistinctRunsFromXMLTransform query looks like this.
> SELECT DISTINCT tblCurrentRunsWithTripsFromXMLTransform.RunId
> FROM tblCurrentRunsWithTripsFromXMLTransform
> ORDER BY tblCurrentRunsWithTripsFromXMLTransform.RunId;
> The query that populates the sub-form is qryDisplayTripInfo
> SELECT tblCurrentOrcaXMLTrip.TripId, tblCurrentOrcaXMLTrip.TripName,
> tblCurrentOrcaXMLTrip.PeakFlag, tblCurrentOrcaXMLTrip.PeakFare
> FROM tblCurrentOrcaXMLTrip;
>
>
>
>
>
> [Non-text portions of this message have been removed]
>


[Non-text portions of this message have been removed]

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

Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/MS_Access_Professionals/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/MS_Access_Professionals/join
(Yahoo! ID required)

<*> To change settings via email:
MS_Access_Professionals-digest@yahoogroups.com
MS_Access_Professionals-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
MS_Access_Professionals-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/

Tidak ada komentar:

Posting Komentar