Using Access 2010 for a church database
The following SQL pulls names from tblTrinity
In the 3 instances I will show below, the husband has died and, the widow moved to a new record. For whatever reason, the widow's address has a " - " appended prior to the address, yielding these results. The " - " does not show in the table.
UniqueID LastName FirstName AptNbr AddressCheck
85 Cameron Cliff 15 Cathcart ST
264 Hartung Kenneth 6 Parkside DR
308 Jenkinson Michael 47 Rickson AVE
942 Cameron Hazel - 15 Cathcart ST
927 Jenkinson Joan - 5 Somerset Glen
975 Hartung Inez - 6 Parkside DR
The problem would seem to occur in the piece of code that creates the AddressCheck column
Does anybody spot what is causing this to occur? And only when new records have been created by moving the widow to a new record?
Thanks.
Tom
The following SQL pulls names from tblTrinity
Code:
SELECT tblTrinity.UniqueID, tblTrinity.LastName, tblTrinity.FirstName, tblTrinity.AptNbr, IIf(IsNull([tblTrinity].[AptNbr]),"",[tblTrinity].[AptNbr] & " - ") & [tblTrinity].[HouseNbr] & " "+[tblTrinity].[Street] & IIf(IsNull([Address2]+[tblTrinity].[Street]),"",Chr(13)+Chr(10)) & [Address2] AS AddressCheck
FROM tblTrinity
WHERE (((tblTrinity.LastName)="Hartung")) OR (((tblTrinity.LastName)="Jenkinson")) OR (((tblTrinity.LastName)="Cameron"));
In the 3 instances I will show below, the husband has died and, the widow moved to a new record. For whatever reason, the widow's address has a " - " appended prior to the address, yielding these results. The " - " does not show in the table.
UniqueID LastName FirstName AptNbr AddressCheck
85 Cameron Cliff 15 Cathcart ST
264 Hartung Kenneth 6 Parkside DR
308 Jenkinson Michael 47 Rickson AVE
942 Cameron Hazel - 15 Cathcart ST
927 Jenkinson Joan - 5 Somerset Glen
975 Hartung Inez - 6 Parkside DR
The problem would seem to occur in the piece of code that creates the AddressCheck column
Code:
AddressCheck: IIf(IsNull([tblTrinity].[AptNbr]),"",[tblTrinity].[AptNbr] & " - ") & [tblTrinity].[HouseNbr] & " "+[tblTrinity].[Street] & IIf(IsNull([Address2]+[tblTrinity].[Street]),"",Chr(13)+Chr(10)) & [Address2]
Does anybody spot what is causing this to occur? And only when new records have been created by moving the widow to a new record?
Thanks.
Tom