S
sse1979
In Access 2003, I created a database for tracking landowners. Created a
report that pulls landowner names with a text box (usingthe main data table,
data entered thru a form). Landowner names are: [Owner1FirstName],
[Owner1LastName], [Owner2FirstName], [Owner2LastName] all the way to 7
landowner first and last names, same format. If there are two landowners,
the text box on the report says =[Owner1FirstName] & " " & [Owner1LastName] &
" and " & [Owner2FirstName] & " " & [Owner2LastName]
With 3 landowners, I add & ", " & after the first owner and & ", and " &
after the 2nd owner. This format follows all the way to 7 landowners, with
the commas and the "and" in different locations. So I have 7 versions of one
report to account for the 7 ways of formatting the 7 landowners. Is there a
way using Iif (IsNull) Statements to account for this, and only have one
report that sticks the commas and the "and" where necessary depending on
whether the fields are blank? Something like: If Owner3 is null or blank,
use [Owner1] & " and " & [Owner2], if not then use [Owner1] & ", " & [Owner2]
& ", and " & [Owner3] ??? But all the way to 7? Or would some other type
of function or statement be more appropriate? Or use a query? Please help.
Thank you.
report that pulls landowner names with a text box (usingthe main data table,
data entered thru a form). Landowner names are: [Owner1FirstName],
[Owner1LastName], [Owner2FirstName], [Owner2LastName] all the way to 7
landowner first and last names, same format. If there are two landowners,
the text box on the report says =[Owner1FirstName] & " " & [Owner1LastName] &
" and " & [Owner2FirstName] & " " & [Owner2LastName]
With 3 landowners, I add & ", " & after the first owner and & ", and " &
after the 2nd owner. This format follows all the way to 7 landowners, with
the commas and the "and" in different locations. So I have 7 versions of one
report to account for the 7 ways of formatting the 7 landowners. Is there a
way using Iif (IsNull) Statements to account for this, and only have one
report that sticks the commas and the "and" where necessary depending on
whether the fields are blank? Something like: If Owner3 is null or blank,
use [Owner1] & " and " & [Owner2], if not then use [Owner1] & ", " & [Owner2]
& ", and " & [Owner3] ??? But all the way to 7? Or would some other type
of function or statement be more appropriate? Or use a query? Please help.
Thank you.