Do sfSubForm.fForm.RecordSource and Forms (fForm) .RecordSource refer to the same object and property?
this confuses me a lot and I can't find the answer anywhere, so thought I would post here to see if anyone can help!
I have a form in an Access 2007 database with a subform (sfSubform) embedded in it. The SourceObject control of a subform is set to be another form (fForm). fForm RecordSource starts out as a table.
At some point, I want to change the data displayed in the subform to the result of the SQL statement, so I use
sfSubform.Form.RecordSource = strSQL.
This works great. However, if I output the RecordSource name for fForm after making this change, it will still indicate the name of the table I set up.
Is the sfSubform.Form.RecordSource source fForm not working? Is this a copy of fForm embedded in the control?
Hope this all makes sense.
a source to share
Sub-form and form have their own record source (or are unrelated). The point is that it is actually the ability to represent two different sets of data. Usually the two forms have linked record sources and this link is declared using the Master / Child Link, but this is also optional as per need.
So, no, changing one will not change the other.
a source to share