Thank you for viewing. I believe this is an VbIssue, but if it's better posted in queries, please advise. Using A2K in XP. VbNovice. This post has been edited to provide more detail.
I need to print mailing labels for Individuals, Companies and Households. For Households I have big troubles. I'm trying to get a record set to print labels in a specific format according to Household information.
The tblHousehold is parent of the tblHouseMem. Each household member has a Type (Family Contact, Spouse, Partner, Family Member, Juvenile). Addresses come from tblAdr and tblAdrMem. The scenarios for the Print Label differ according to HouseholdMember Type. Scenarios follow and assumes address info follows immediately thereafter:
1. Household has a Family Contact and a Spouse or Partner with the same last name.
Print Line1 [Forename Family Contact] “and” [Forename Spouse or Partner] [LastName]
** Additionally, for Sc1, I don’t know a solution to concatenate the two Forename fields within the same record set and then get their names to print on line 1 e.g., if the AdrMemID and FamilyID for any Contact are equal and the SurNames are equal then get each ForeName in the Label’s ForeName field separated by “and”.
2. Household has a Family Contact and a Spouse or Partner with different last names.
Print Line1 [Forename Family Contact] [Surname FamilyContact]
Print Line2 [Forename Spouse or Partner] [Surname Spouse or Partner]
3. Household does not have an Adult associated with it.
Print Line1 “The ”[Surname Juvenile or FamilyMember]“ Household”
** Additionally, in this overall query, is there any advise on getting both the Households with Adults and Households without Adults to be on the same list WITHOUT including Juveniles of households with adults?
I don’t know where to begin: vbcode or query. Is it best to simply create one query for each scenario and then query these in order to get something to base a PrintLabel Report on? If so, any advice on quering 4-5 queries? Advise on getting two names in one field?
Many thanks for any consideration!
Comment added July 19th:
I believe that a partial solution for Sc1 is to use a Fn fConcatChild to get both FirstNames in one field and then some type of Fn to replace the ";" character in this string to "and". But I still unable to get this done with any confidence.
I need to print mailing labels for Individuals, Companies and Households. For Households I have big troubles. I'm trying to get a record set to print labels in a specific format according to Household information.
The tblHousehold is parent of the tblHouseMem. Each household member has a Type (Family Contact, Spouse, Partner, Family Member, Juvenile). Addresses come from tblAdr and tblAdrMem. The scenarios for the Print Label differ according to HouseholdMember Type. Scenarios follow and assumes address info follows immediately thereafter:
1. Household has a Family Contact and a Spouse or Partner with the same last name.
Print Line1 [Forename Family Contact] “and” [Forename Spouse or Partner] [LastName]
** Additionally, for Sc1, I don’t know a solution to concatenate the two Forename fields within the same record set and then get their names to print on line 1 e.g., if the AdrMemID and FamilyID for any Contact are equal and the SurNames are equal then get each ForeName in the Label’s ForeName field separated by “and”.
2. Household has a Family Contact and a Spouse or Partner with different last names.
Print Line1 [Forename Family Contact] [Surname FamilyContact]
Print Line2 [Forename Spouse or Partner] [Surname Spouse or Partner]
3. Household does not have an Adult associated with it.
Print Line1 “The ”[Surname Juvenile or FamilyMember]“ Household”
** Additionally, in this overall query, is there any advise on getting both the Households with Adults and Households without Adults to be on the same list WITHOUT including Juveniles of households with adults?
I don’t know where to begin: vbcode or query. Is it best to simply create one query for each scenario and then query these in order to get something to base a PrintLabel Report on? If so, any advice on quering 4-5 queries? Advise on getting two names in one field?
Many thanks for any consideration!
Comment added July 19th:
I believe that a partial solution for Sc1 is to use a Fn fConcatChild to get both FirstNames in one field and then some type of Fn to replace the ";" character in this string to "and". But I still unable to get this done with any confidence.
Last edited: