I know but from how can I set the end date to match the start date to restrinct the date to a single day?
If the form opens and the controls are as follows:
Start date = 25/02/2008 Start Time = 08:00
End date = 25/02/2008 End Time = 08:30
And the user changes the start date to 27/02/2008
the controls will then be as follows:
Start date = 27/02/2008 Start Time = 08:00
End date = 25/02/2008 End Time = 08:30
Does not make sense does it?
I need the date restricted to a single day.
If the form was my own I would modify the changed event of the start date control so that each time it changed the end date control would be changed to match it.
But it is the built in appointment form I am using so cannot do this.
I have tried to intercept this after the appointment form closes and setting the end date and time as follows:
app.EndTime = New DateTime(app.StartTime.Year, app.StartTime.Month, app.StartTime.Day, app.EndTime.Hour, app.EndTime.Minute, app.EndTime.Second)
but as I have no control or cannot see what code is behind the Save & Close button by the type the form has closed and gets to my code the app.startdate.day has been reset back to 25/02/2008
Do you understand my problem now?