K
KevinPreston via AccessMonster.com
Hi, i hope someone can help me, i would like to hide various fields under
different conditions.
i have combed other posts about the subject and they have help me greatly, i
am about 75% there.
But now i am stuck. I have 5 fields, one called tachotype, this tells me what
type of tacho is in a vehicle, digital, analogue or none. One called tachocal,
this tells me when the tacho was calibrated. One called CalDue, this tells me
when the next calibration is due. One called tachotest, this tells me when
the tacho had its 2yr test. One called 2yrDue, this tells me when the next
2yr test is due.
When tachotype = "none" hide all four fields, this i can do.
When tachotype = "analogue" show all four fields, this i can do.
the problem is -
When tachotype = "digital" i want to hide the 2yrtest & 2yrDue fields, this i
can't do yet.
An added complication is that a analogue tacho has a calibration every 6
years and a 2yr test evry 2yrs, a digital tacho is calibrated every 2 years.
The CalDue & 2yrDue fields are calculated fields and when tachotype =
"digital" i would like it to only calculate 2 years on.
This is the code i have at the moment:
Private Sub Form_Current()
If Me.[tachotype] = "None" Then
Me.[TACHOCAL].Visible = False
Me.[TACHOTEST].Visible = False
Me.[2yrDue].Visible = False
Me.[Due_Cal].Visible = False
Else
Me.[TACHOTEST].Visible = (Me.[tachotype] = "analogue")
Me.[2yrDue].Visible = (Me.[tachotype] = "analogue")
Me.[TACHOCAL].Visible = (Me.[tachotype] = "analogue")
Me.[Due_Cal].Visible = (Me.[tachotype] = "analogue")
End If
End Sub
I apologise for the longwindedness of the post but if i get it right now then
i won't have to keep clarifying things.
Hopefully someone can help.
different conditions.
i have combed other posts about the subject and they have help me greatly, i
am about 75% there.
But now i am stuck. I have 5 fields, one called tachotype, this tells me what
type of tacho is in a vehicle, digital, analogue or none. One called tachocal,
this tells me when the tacho was calibrated. One called CalDue, this tells me
when the next calibration is due. One called tachotest, this tells me when
the tacho had its 2yr test. One called 2yrDue, this tells me when the next
2yr test is due.
When tachotype = "none" hide all four fields, this i can do.
When tachotype = "analogue" show all four fields, this i can do.
the problem is -
When tachotype = "digital" i want to hide the 2yrtest & 2yrDue fields, this i
can't do yet.
An added complication is that a analogue tacho has a calibration every 6
years and a 2yr test evry 2yrs, a digital tacho is calibrated every 2 years.
The CalDue & 2yrDue fields are calculated fields and when tachotype =
"digital" i would like it to only calculate 2 years on.
This is the code i have at the moment:
Private Sub Form_Current()
If Me.[tachotype] = "None" Then
Me.[TACHOCAL].Visible = False
Me.[TACHOTEST].Visible = False
Me.[2yrDue].Visible = False
Me.[Due_Cal].Visible = False
Else
Me.[TACHOTEST].Visible = (Me.[tachotype] = "analogue")
Me.[2yrDue].Visible = (Me.[tachotype] = "analogue")
Me.[TACHOCAL].Visible = (Me.[tachotype] = "analogue")
Me.[Due_Cal].Visible = (Me.[tachotype] = "analogue")
End If
End Sub
I apologise for the longwindedness of the post but if i get it right now then
i won't have to keep clarifying things.
Hopefully someone can help.