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 / General 1 / May 2008

Tip: Looking for answers? Try searching our database.

Parameter Pop-up when changing subform

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
stevenrec - 16 May 2008 08:11 GMT
Hi,
guess I am overlooking something,
using a list, I change what info is displayed on a form that has 3
subforms.
after selecting the topic to display, the subform names and links are
read from a table, then the master form is updated using the info

'all values = string variable
Me.Sfrm_3.SourceObject = form_3
Me.Sfrm_2.SourceObject = form_2
Me.Sfrm_1.SourceObject = form_1
Me.Title_1.Caption = form1_txt
Me.Title_2.Caption = form2_txt
Me.Title_3.Caption = form3_txt
Me.Sfrm_3.LinkMasterFields = Link_2_Parent
Me.Sfrm_3.LinkChildFields = Link_2_Child
Me.Sfrm_2.LinkMasterFields = Link_1_Parent
Me.Sfrm_2.LinkChildFields = Link_1_Child

my problem is it keeps asking through pop-up windows the parameter for
the last used link-field data.
have tried setting linkchildfield and parent to null or nothing or ""
before the update.
It works fine if I just hit enter each time, the info is correct in
the end, but apparently the links are still there during the change
over.

what do I need to add to be able to change the subforms and link-
fields on an open form without the popup parameter windows?

thanks
Albert D. Kallal - 16 May 2008 11:36 GMT
I seen this problem.

Try:
Me.Sfrm_3.SourceObject = form_3
Me.Sfrm_3.LinkMasterFields = ""
Me.Sfrm_3.LinkChildFields = ""

So, right after you assing the form object, kill the link master/child...

I also found that if I modify the sub-forms sql direct, then again, I had to
go:

  Me.subTourFriends.Form.frmTourBuses.Form.RecordSource = strSql
  Me.subTourFriends.Form.frmTourBuses.LinkChildFields = ""
  Me.subTourFriends.Form.frmTourBuses.LinkMasterFields = ""

It's been awhile since I've done this, but if my memory serves me correct
the problem was that if you have a relationship setup in the tables, MS
access tries to do you a favor and sets the link master child for you based
on those relationships (and that's not necessary what you want).

In my above example, note how I had to kill master/ child settings **after**
I set that SQL.

So, if the 1st above suggestion of clearing out the link master don't work,
then:

You could try to ensure the sub forms data source is
NOT already set (leave it blank).

Thus, you go:

Me.Sfrm_3.SourceObject = form_3
me.Sfrm_3.Form.RecordSource = "your sql for form goes here"
Me.Sfrm_3.LinkMasterFields = Link_2_Parent
Me.Sfrm_3.LinkChildFields = Link_2_Child

I'm quite sure the above (last) suggestion will work with a blank
datasource. (not exactly a pretty work around, but I think it will solve
this And tell someone else jumps into this thread with a better suggestion).

Signature

Albert D. Kallal    (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal@msn.com

stevenrec - 19 May 2008 07:55 GMT
Thanks,

used the ideas, had to modify it a little to get it to work,
Usual Friday, could not think of anything else, thanks again for the
idea.
 
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.