Hi All
I have written the following code which works fine but I need to press Tab after type end date in the textbox to make it work.
Can I change it into so that it automatically captures if the end date has been typed in textbox named txtEndDate and then runs the code ? I think it needs to be in change event but how to check if the date has been typed in or not.
Thanks
I have written the following code which works fine but I need to press Tab after type end date in the textbox to make it work.
Can I change it into so that it automatically captures if the end date has been typed in textbox named txtEndDate and then runs the code ? I think it needs to be in change event but how to check if the date has been typed in or not.
Code:
Private Sub txtEndDate_Exit(Cancel As Integer)
If IsNull(Me.txtEndDate) Then
MsgBox "Please make sure you have entered StartDate and End Date", vbCritical + vbOKOnly, "Can't leave Dates blank"
Cancel = True
Else
Me.FraOption.Visible = True
Me.OptPrintAll.Visible = True
Me.optPrintSel.Visible = True
'Me.lblPrintAll.Visible = True
'Me.lblPrintSel.Visible = True
Me.lblPrintFilter.Visible = True
End If
End Sub
Thanks