Hi everybody,
I have this:
[code]
If IsDate(datMachineInstallationDate.Value) AndAlso IsDate(datMachineInstallationEndDate.Value) Then
If datMachineInstallationDate.Value > datMachineInstallationEndDate.Value Then
.Message = getText(wForm, "VB_EINDDATUMFOUT", "De einddatum van de installatie moet groter zijn dan de installatiedatum.", Me.Page.ToString)
.SetFocus = "datMachineInstallationEndDate"
End If
End If
[/code]
But if there is only one datefield filled in then also the message: .Message = getText(wForm, "VB_EINDDATUMFOUT", "De einddatum van de installatie moet groter zijn dan de installatiedatum.", Me.Page.ToString)
is showing. But Only if both dates are filled in then the message has to be shown.
Thank you.
Niels
albert albertPosted Apr 7, 2014, 4:39 AM
I solved like this:
[code]
Niels
albert albertPosted Apr 7, 2014, 3:47 AM
I have it now like this:
[code]
But now if you leave one date value empty then it will be saved, so that is correct.
But If you put the enddate before the installatie datum then also the message is not showing :(
albert albertPosted Apr 7, 2014, 3:11 AM
thank you for your answare.
But I dont see a IsEmpty() function.
You mean after value?
If IsDate(datMachineInstallationDate.Value.IsEmpty()) AndAlso IsDate(datMachineInstallationEndDate.Value.IsEmpty()) Then
But that doesnt work.
Niels
Sivaraman DhamodaranPosted Apr 7, 2014, 2:53 AM