RonMcIntire
Technical User
All:
I have a form with fields referenceing a table source, tblFamilyREc, and two subforms, one with a second table source tblIndivRec, and another with a query built on both of the aforementioned tables. Both tables include a FamilyID field which are joined.
I wish to print one record from the tblFamilyRec source. As you might expect, I receive the error "The specified 'FamilyID' field could refer to more than one table in the FROM clause."
Here's the offending code:
Dim strDocName As String
Dim strWhere As String
Dim strMsg As String
Dim strMsg1, strMsg2, strMsg3, strMsg4, strMsg5 As String
Dim strCCTo, strBCCTo, strSubject As String
strDocName = "srptDESK COPY - Members"
strWhere = "FamilyID=" & [FamilyID]
.
.
.
DoCmd.OpenReport strDocName, acPreview, , strWhere
I know the argument in the strWhere statement must contain a reference table data source like tblFamilyRec.FamilyID that includes the FamilyID field, but I've tried many things that seem logical to me but nothing works.
Any suggestions?
I have a form with fields referenceing a table source, tblFamilyREc, and two subforms, one with a second table source tblIndivRec, and another with a query built on both of the aforementioned tables. Both tables include a FamilyID field which are joined.
I wish to print one record from the tblFamilyRec source. As you might expect, I receive the error "The specified 'FamilyID' field could refer to more than one table in the FROM clause."
Here's the offending code:
Dim strDocName As String
Dim strWhere As String
Dim strMsg As String
Dim strMsg1, strMsg2, strMsg3, strMsg4, strMsg5 As String
Dim strCCTo, strBCCTo, strSubject As String
strDocName = "srptDESK COPY - Members"
strWhere = "FamilyID=" & [FamilyID]
.
.
.
DoCmd.OpenReport strDocName, acPreview, , strWhere
I know the argument in the strWhere statement must contain a reference table data source like tblFamilyRec.FamilyID that includes the FamilyID field, but I've tried many things that seem logical to me but nothing works.
Any suggestions?