Tony
06-20-2013, 01:19 AM
Hi everyone.
Currently i'm using a have a calendar made by microsoft for replacement of datepicker. Everything works fine but i'm not able to initialize the afterupdate event.
I have connected a textbox to the calendar. so everytime i update the calendar the textbox gets the value of the calandar.
When i click on the textbox the event works fine
Me.txtDatumSelectie = Me.objKalender.Value
Me.SF_Urenregistratie.Requery
Me.txtTotaalDag.Requery
But i cannot set it to afterupdate so i dont have to do anything except clicking on the calendar.
The code i used for the calendar in the form:
Private WithEvents calendarForm As Form_frmCalendar
Private Sub calendarForm_DateChanged(newDate As Date)
Me.objKalender = newDate
End Sub
Private Sub Form_Current()
On Error Resume Next
calendarForm.Value = Me.objKalender
End Sub
Private Sub Form_Open(Cancel As Integer)
Set calendarForm = Me.CalendarSubForm.Form
End Sub
Why does it not work :(
Currently i'm using a have a calendar made by microsoft for replacement of datepicker. Everything works fine but i'm not able to initialize the afterupdate event.
I have connected a textbox to the calendar. so everytime i update the calendar the textbox gets the value of the calandar.
When i click on the textbox the event works fine
Me.txtDatumSelectie = Me.objKalender.Value
Me.SF_Urenregistratie.Requery
Me.txtTotaalDag.Requery
But i cannot set it to afterupdate so i dont have to do anything except clicking on the calendar.
The code i used for the calendar in the form:
Private WithEvents calendarForm As Form_frmCalendar
Private Sub calendarForm_DateChanged(newDate As Date)
Me.objKalender = newDate
End Sub
Private Sub Form_Current()
On Error Resume Next
calendarForm.Value = Me.objKalender
End Sub
Private Sub Form_Open(Cancel As Integer)
Set calendarForm = Me.CalendarSubForm.Form
End Sub
Why does it not work :(