Hi,
I have an ElseIf statement that works for a textBox, but when I used a DTPicker instead of a textbox, doesn't work; it will follow the visible=false statement, but won't become visible again after changing the value back to a visible=true value.
here is the code I have txtOvernights box
Code
Private Sub txtOvernights_Change()
If Me.txtOvernights.Value = "" Then
Me.txtDepDate.Visible = True
Me.txtReturnDate.Visible = True
ElseIf Me.txtOvernights.Value > 0 Then
Me.txtDepDate.Visible = False
Me.txtReturnDate.Visible = False
Else
Me.txtDepDate.Visible = True
Me.txtReturnDate.Visible = True
End If
End Sub
Display More
basically I am using the DTPickers to count the number of overnights in a span date span, but you can manually input overnights into a separate textbox (txtOvernights), then I want the dtpickers to be unseen on the form.
I read that ms calendars are glitchy, or is there something i am missing in the code?