I have a form that displays the Months, Days and Hours that have passed from a certain date.
When the [Months] value is displaying i want to hide [Days] and [Hours]. And the same if [Days] or [Hours] is displaying, i would like to hide the other two.
This works fine as long as i scroll forwards through the records, when i scroll backwards it displays [Days] and [Hours] at the same time. Is there a logical reason why???
This is the code:
Private Sub Form_Current()
If Me![Hours] <= 24 Then
Me![Hours].Visible = True
Else
Me![Hours].Visible = False
End If
If Me![Days] >= 1 Then
If Me![Days] <= 31 Then
Me![Days].Visible = True
Else
Me![Days].Visible = False
End If
End If
If Me![Months] <= 1 Then
Me![Months].Visible = False
Else
Me![Months].Visible = True
End If
End Sub
HELP!!!!!!!
When the [Months] value is displaying i want to hide [Days] and [Hours]. And the same if [Days] or [Hours] is displaying, i would like to hide the other two.
This works fine as long as i scroll forwards through the records, when i scroll backwards it displays [Days] and [Hours] at the same time. Is there a logical reason why???
This is the code:
Private Sub Form_Current()
If Me![Hours] <= 24 Then
Me![Hours].Visible = True
Else
Me![Hours].Visible = False
End If
If Me![Days] >= 1 Then
If Me![Days] <= 31 Then
Me![Days].Visible = True
Else
Me![Days].Visible = False
End If
End If
If Me![Months] <= 1 Then
Me![Months].Visible = False
Else
Me![Months].Visible = True
End If
End Sub
HELP!!!!!!!