mizenerman
MIS
I have a report that is populated from a table using a query. On the report is the following bound controls:
Name
MRN
MD
The following is unbound:
PathDateMS
In the unbound field I'm successfully populating it with data from two hidden controls on the report (combining them to populate the the unbound field) using the following code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If IsNull(Me![AddBiopsyMS]) Then
Me![PathDateMS] = ""
Else
Me![PathDateMS] = [BiopsyDate] & " - " & [BiopsyMS]
End If
If IsNull(Me![AddBiopsyMS2]) Then
Me![PathDateMS] = ""
Else
Me![PathDateMS] = [BiopsyDate2] & " - " & [BiopsyMS2]
End If
End Sub
The issue becomes if the AddBiopsyMS field is not null for one record and the AddBiopsyMS2 field is not null only the records for the AddBiopsyMS2 field appear on the report. The code is ignoring the first If and only reading the last If statement. My questions are: Is what I'm attempting to do possible?
Obviously my code structure is the issue but where I'm I failing?
Thank you in advance for your assistance.
Name
MRN
MD
The following is unbound:
PathDateMS
In the unbound field I'm successfully populating it with data from two hidden controls on the report (combining them to populate the the unbound field) using the following code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If IsNull(Me![AddBiopsyMS]) Then
Me![PathDateMS] = ""
Else
Me![PathDateMS] = [BiopsyDate] & " - " & [BiopsyMS]
End If
If IsNull(Me![AddBiopsyMS2]) Then
Me![PathDateMS] = ""
Else
Me![PathDateMS] = [BiopsyDate2] & " - " & [BiopsyMS2]
End If
End Sub
The issue becomes if the AddBiopsyMS field is not null for one record and the AddBiopsyMS2 field is not null only the records for the AddBiopsyMS2 field appear on the report. The code is ignoring the first If and only reading the last If statement. My questions are: Is what I'm attempting to do possible?
Obviously my code structure is the issue but where I'm I failing?
Thank you in advance for your assistance.