In the detail section of my Report I have one little field which needs to EITHER display a number OR a letter depending on whether it is a form or not. I have managed to figure out how to have JUST the form letter display OR the revision number - but not how to have each line item display whichever is correct.
Procedures have a revision number (ProcRev#).
Forms ALSO have a revision number (ProcRev#), AND a form letter (ProcFormRevLetter) in its own field.
So I check to see if the Letter field is Null, if Yes then I want the Letter field Hidden and the Rev# field Visible - if the Letter field is Not Null then I want the Letter field Visible and the Rev# field Hidden...
This code works to a limited degree - right now, because there ARE Letters, it ONLY displays Letters and no numbers at all:
Private Sub GroupHeader2_Format(Cancel As Integer, FormatCount As Integer)
If Me![ProcFormRevLetter] = Null Then
Me![ProcFormRevLetter].Visible = False
Me![ProcRev#].Visible = True
Else
Me![ProcFormRevLetter].Visible = True
Me![ProcRev#].Visible = False
End If
End Sub
I understand WHY it's hiding the revision numbers - it's acting on the report sort of as a single entity instead of treating each line item (there will almost always be more than one) as a seperate entity.
So what I need to know is how to make the code check each line item instead of it being so "all or nothing." I've tried messing with a For Each, Next statement but end up with the same "all or nothing" situation.
I'm still too new at programming to understand what I really need to have the code checking against...
Help?!
Thanks!
*~*~*~*~*~*~*~*~*~*~*~*~*
Insanity is a matter of Perception.![[yinyang] [yinyang] [yinyang]](/data/assets/smilies/yinyang.gif)
Procedures have a revision number (ProcRev#).
Forms ALSO have a revision number (ProcRev#), AND a form letter (ProcFormRevLetter) in its own field.
So I check to see if the Letter field is Null, if Yes then I want the Letter field Hidden and the Rev# field Visible - if the Letter field is Not Null then I want the Letter field Visible and the Rev# field Hidden...
This code works to a limited degree - right now, because there ARE Letters, it ONLY displays Letters and no numbers at all:
Private Sub GroupHeader2_Format(Cancel As Integer, FormatCount As Integer)
If Me![ProcFormRevLetter] = Null Then
Me![ProcFormRevLetter].Visible = False
Me![ProcRev#].Visible = True
Else
Me![ProcFormRevLetter].Visible = True
Me![ProcRev#].Visible = False
End If
End Sub
I understand WHY it's hiding the revision numbers - it's acting on the report sort of as a single entity instead of treating each line item (there will almost always be more than one) as a seperate entity.
So what I need to know is how to make the code check each line item instead of it being so "all or nothing." I've tried messing with a For Each, Next statement but end up with the same "all or nothing" situation.
I'm still too new at programming to understand what I really need to have the code checking against...
Help?!
Thanks!
*~*~*~*~*~*~*~*~*~*~*~*~*
Insanity is a matter of Perception.
![[yinyang] [yinyang] [yinyang]](/data/assets/smilies/yinyang.gif)