Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / August 2005

Tip: Looking for answers? Try searching our database.

Form & Multiple sub-forms

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
faberk - 08 Aug 2005 15:29 GMT
I have created a main form and added two subforms.  I have linked form1 to
the main form using the Master Fields/Child Fields links.  On form2 i wish to
have the user enter information in existing fields (not adding records).  I
have linked form2 to form1 on common fields.  I am able to see the
information, but the form is not updateable.  Can someone tell me why?

The other problem is with the synchronization between the two forms.  As i
move my cursor through records in form1, synchroization of data with form2 is
not happening.

Can anyone help me?  Thanks in advance
Marshall Barton - 08 Aug 2005 17:23 GMT
>I have created a main form and added two subforms.  I have linked form1 to
>the main form using the Master Fields/Child Fields links.  On form2 i wish to
[quoted text clipped - 5 lines]
>move my cursor through records in form1, synchroization of data with form2 is
>not happening.

There is something wrong with the way you are linking form2
to form1.  If you'll explain how you're trying to do that,
maybe someone will be able to straighten it out.

Signature

Marsh
MVP [MS Access]

faberk - 09 Aug 2005 13:02 GMT
Sorry for the delay.

Main form named frmPDE.  It's recordsource is a table named tblRegions.  The
fields in this table are: RegionID; RegionDescr

Text box on the main form based on the RegionDescr field, which the main
form is based on.  I will use navigation button to move between records.

The first subform is named frmPDEMkts.  Field List: RegionId; MktLEvel;
MktArea; MktArea; MktAreaDescr, etc.  Link Child Fields: RegionId.  Link
Master fields: RegionId

the second subform is named frmPDEData.  Field List:
MktLevel;MktArea;ProdGrp, Currency, Jan, Feb, etc.  Link Child Fields:
MktLevel;MktArea.  Link Master Fields:
[frmPDEMkts].Form![MktLevel];[frmPDEMkts].Form![MktArea]

The subform frmMkts works with no problems, but i cant get the frmPDEData to
work.  I loooked at the MS sample database, which had a similar
configuration.  It was working, but it would not allow the user to change
records in the child form.  I need to do that also.  Any help would be
greatly apprciated.  Thanks

The 1st subform is named frmPDEMkts.  

> >I have created a main form and added two subforms.  I have linked form1 to
> >the main form using the Master Fields/Child Fields links.  On form2 i wish to
[quoted text clipped - 9 lines]
> to form1.  If you'll explain how you're trying to do that,
> maybe someone will be able to straighten it out.
faberk - 09 Aug 2005 13:15 GMT
ugh...CORRECTION:

The first subform is named frmPDEMkts.  Field List: RegionId; MktLEvel;
MktArea; MktAreaDescr, etc.  Link Child Fields: RegionId.  Link
Master fields: RegionId

> Sorry for the delay.
>
[quoted text clipped - 34 lines]
> > to form1.  If you'll explain how you're trying to do that,
> > maybe someone will be able to straighten it out.
Marshall Barton - 09 Aug 2005 16:45 GMT
Right, the issue is that a Link Master needs to be a control
on the main form.

Add two hidden text boxes to the main form's header section.
Name them txtLevel and txtArea.  Then add code to the
Current event procedure in frmPDEMkts:
    Parent.txtLevel  = Me.MktLevel
    Parent.txtArea = Me.MktArea

I think that's all you need to do.
Signature

Marsh
MVP [MS Access]

>Main form named frmPDE.  It's recordsource is a table named tblRegions.  The
>fields in this table are: RegionID; RegionDescr
[quoted text clipped - 27 lines]
>> to form1.  If you'll explain how you're trying to do that,
>> maybe someone will be able to straighten it out.
faberk - 09 Aug 2005 16:16 GMT
I solved this.  as it turns out, i needed an "on current" action to requery
the sub-sub form.  Thanks for your time Marshall

> I have created a main form and added two subforms.  I have linked form1 to
> the main form using the Master Fields/Child Fields links.  On form2 i wish to
[quoted text clipped - 7 lines]
>
> Can anyone help me?  Thanks in advance
Marshall Barton - 09 Aug 2005 17:26 GMT
That's generally more work than required.  If it works, it
usually means that form2's record source query has some
criteria that attempts to take the place of the Link
Master/Child properties.  I think(?) it's a little more
efficient to use the Link Master/Child properties instead of
criteria in the query because it at least gives Access an
opportunity to optimize the requery.

This is the first time you've used the term "sub-sub form".
Does this mean that form2 is being display inside Form1?  I
thought that Form1 and form2 were both displayed as separate
subforms on the main form.  If I misunderstood the
arrangement of your subforms, then my previous answer was
not applicable to a main form - subform - subsubform.  In
this case the Link Master property should be a text box on
form1.
Signature

Marsh
MVP [MS Access]

>I solved this.  as it turns out, i needed an "on current" action to requery
>the sub-sub form.  Thanks for your time Marshall
[quoted text clipped - 8 lines]
>> move my cursor through records in form1, synchroization of data with form2 is
>> not happening.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.