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.