J
jay
Setup: mdb application as a front-end to a SQL server database. There's a
main "Session" form and a "Services" subform (many services to one session
relationship). For some entries in the subform there is additional
information required that varies depending on the type of services offered.
There is an "Extension" subform control in the "Services" subform to
accommodate these forms as needed. If an "Extension" subform is needed, I
change the SourceObject property of the "Extension" subform control to the
name of the "Extension" form that needs to be loaded. (There is only one
"Extension" record allowed for a given "Service" record.) The RecordSource
property of each "Extension" form is set to
"SELECT field1, field2, ... FROM dbo_tblExtension001 WHERE
ExtensionForeignKey =
[Forms]![frmSession]![ctlSubService].[Form]![ServicePrimaryKey]".
I leave the LinkChildFields and LinkMasterFields in the "Extension"
subform control blank.
Problem: The above works like a champ in Access 2003 but I cannot make it
work in Access 2007 either by running it in Access 2002-2003 format or by
converting it to Access 2007 format. Access erases the "Extension" forms'
RecordSource fields. I tried resetting the RecordSource property at runtime,
as in: Me.RecordSource = strCorrectRecordSource but it doesn't "take." That
is, if I print Me.RecordSource in the immediate window right after I have
entered it, it prints as blank!
Has anybody run into anything this weird in Access 2007? Any help will be
really appreciated. Thanks in advance.
Jay
main "Session" form and a "Services" subform (many services to one session
relationship). For some entries in the subform there is additional
information required that varies depending on the type of services offered.
There is an "Extension" subform control in the "Services" subform to
accommodate these forms as needed. If an "Extension" subform is needed, I
change the SourceObject property of the "Extension" subform control to the
name of the "Extension" form that needs to be loaded. (There is only one
"Extension" record allowed for a given "Service" record.) The RecordSource
property of each "Extension" form is set to
"SELECT field1, field2, ... FROM dbo_tblExtension001 WHERE
ExtensionForeignKey =
[Forms]![frmSession]![ctlSubService].[Form]![ServicePrimaryKey]".
I leave the LinkChildFields and LinkMasterFields in the "Extension"
subform control blank.
Problem: The above works like a champ in Access 2003 but I cannot make it
work in Access 2007 either by running it in Access 2002-2003 format or by
converting it to Access 2007 format. Access erases the "Extension" forms'
RecordSource fields. I tried resetting the RecordSource property at runtime,
as in: Me.RecordSource = strCorrectRecordSource but it doesn't "take." That
is, if I print Me.RecordSource in the immediate window right after I have
entered it, it prints as blank!
Has anybody run into anything this weird in Access 2007? Any help will be
really appreciated. Thanks in advance.
Jay