Hi
I am not sure this is still open.
If I understand Duane correctly (which is also what I would do), you will need 3 forms:
1) An unbound main form with a hidden txtMyID
2) Your current main form
3) Your current subform
The latter two will now be subforms on the main form (1)
On subform 2, add code to the OnCurrent that says something like:
Parent!txtMyID = Me.YourIDField
Click subform 3 on main form, Properties, Data tab, set Link Master Fields to txtMyID and Link Child Fields to the matching Foreign Key
Abraham
--- In MS_Access_Professionals@yahoogroups.com, Phil Knowles <pdk444444@...> wrote:
>
> Hi Duane
> Â
> Thanks for replying.
> Â
> I'm not altogether with what you mean - Should I display effectively a blank form with a hidden field linking to a subform for the master records which I would display in datasheet view and then when i select any record in the datasheet it would display the 2nd subform (which has multiple records) in form view (or datasheet view for that matter) - is that the general idea?
> Â
> I remember seeing properties called parent child somewhere but can't remember under what circumstances they are displayed - I don't seem to be able to find these properties on a standard single parent form with multiple children subform.
> Â
> so how do i keep the 2 subforms in synch?
> Â
> cheers
> Â
> Phil
> Â
> Â
> Â
> Â
> Â
>
>
> ________________________________
> From: Duane Hookom <duanehookom@...>
> To: "MS_Access_Professionals@yahoogroups.com" <ms_access_professionals@yahoogroups.com>
> Sent: Monday, 17 September 2012, 19:49
> Subject: RE: [MS_AccessPros] Re: sub form from datasheet view
>
>
> Â
> You could try two subforms on an unbound main form. The top subform could be the parent/master with the bottom subform displaying the child records. I typically use a hidden text box on the main form to store the primary key value from the master subform and then use the Link Master/Child properties to keep everything in synch.
>
> Duane Hookom
> MS Access MVP
>
>
> > To: mailto:MS_Access_Professionals%40yahoogroups.com
> > From: mailto:pdk444444%40yahoo.co.uk
> > Date: Mon, 17 Sep 2012 18:08:11 +0100
> > Subject: Re: [MS_AccessPros] Re: sub form from datasheet view
> >
> > Hi Clive
> >
> > I tried this but it says that if a form contains a subform then it can't be viewed in continuous forms mode?
> >
> > Phil
> >
> >
> >
> >
> > ________________________________
> > From: Clive <mailto:zctek%40aol.com>
> > To: mailto:MS_Access_Professionals%40yahoogroups.com
> > Sent: Monday, 17 September 2012, 17:11
> > Subject: [MS_AccessPros] Re: sub form from datasheet view
> >
> >
> >
> >
> >
> > Hi Phil,
> >
> > It will not work with the MainForm in DataSheeetView
> > because you will not be able to see a SubForm.
> > In addition you will not be able to see/access any
> > CommandButtons on the MainForm in DatSheetView.
> >
> > Instead, make the MainForm ContinuousForms, then you
> > will be able to see the SubForm in FormView or DatasheetView.
> >
> > Hope that helps.
> >
> > Regards, Clive.
> >
> > --- In mailto:MS_Access_Professionals%40yahoogroups.com, "pdk444444" <pdk444444@> wrote:
> > >
> > > I have a form (single record) with a subform below showing multiple records relating to the main form record - standard stuff.
> > >
> > > I want to view the main form in datasheet view and have the subform visible each time I select a different record in the main datasheet and for it to act in exactly the same way as it does in form view (ie I can add, delete and update it's records as well as view them)
> > >
> > > I am trying to display the subform via an embedded macro in the 'on current' property but am not getting the correct sub records
> > >
> > > Any help would be appreciated.
> > >
> > > Phil
> > >
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
> > ------------------------------------
> >
> > Yahoo! Groups Links
> >
> >
> >
>
>
> [Non-text portions of this message have been removed]
>
>
>
>
> [Non-text portions of this message have been removed]
>
Rabu, 03 Oktober 2012
[MS_AccessPros] Re: sub form from datasheet view
__._,_.___
.
__,_._,___
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar