I have a report which prints address. Some users have multiple addresses, but they have a preffered address. Only with those that have multiple address, I need to print out only the one that is preffered. The following is what I've done, but it doesn't work:
I first have this in the Report_Open
PersonID = -1, which is a public variable
then, the following is in the detail_Format
--code--
id = [IndividualKey]
'a personal id number
If PersonID = id Then
'if it repeats, then if it's not the prefferd address, make it invisible
If IsNull([PreferredAddress]) Then
[WholeAddress].Visible = False
'other wise show it
Else
[WholeAddress].Visible = True
End If
End If
--code--
and by default, it is visible
Thank you very much in advance
I first have this in the Report_Open
PersonID = -1, which is a public variable
then, the following is in the detail_Format
--code--
id = [IndividualKey]
'a personal id number
If PersonID = id Then
'if it repeats, then if it's not the prefferd address, make it invisible
If IsNull([PreferredAddress]) Then
[WholeAddress].Visible = False
'other wise show it
Else
[WholeAddress].Visible = True
End If
End If
--code--
and by default, it is visible
Thank you very much in advance