starclassic
Technical User
Hello everyone,
For some reason the txtExpDate_AfterUpdate()
does not carry the date to next record. If date is entered manualy will work but if I choose the date from the form Calendar thats pop up when click doesn't carry the value to next record. Any Ideas.I try everything and seems not working.
Private Sub txtExpDate_AfterUpdate()
Me.txtExpDate.DefaultValue = "#" & Me.txtExpDate & "#"
End Sub
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Module
Option Compare Database
Public olddate As Date
Public Originator As Control
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Private Sub txtExpDate_Click()
'open form calendar to select date.
Dim stDocName As String
stDocName = "frmCalendar"
Set Originator = Me.txtExpDate
olddate = IIf(IsDate(Me.txtExpDate.Value), Me.txtExpDate.Value, Now)
DoCmd.OpenForm stDocName, , , , , acDialog
Exit_txtExpDate_Click:
Exit Sub
Err_txtExpDate_Click:
MsgBox Err.Description
Resume Exit_txtExpDate_Click
End Sub
For some reason the txtExpDate_AfterUpdate()
does not carry the date to next record. If date is entered manualy will work but if I choose the date from the form Calendar thats pop up when click doesn't carry the value to next record. Any Ideas.I try everything and seems not working.
Private Sub txtExpDate_AfterUpdate()
Me.txtExpDate.DefaultValue = "#" & Me.txtExpDate & "#"
End Sub
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Module
Option Compare Database
Public olddate As Date
Public Originator As Control
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Private Sub txtExpDate_Click()
'open form calendar to select date.
Dim stDocName As String
stDocName = "frmCalendar"
Set Originator = Me.txtExpDate
olddate = IIf(IsDate(Me.txtExpDate.Value), Me.txtExpDate.Value, Now)
DoCmd.OpenForm stDocName, , , , , acDialog
Exit_txtExpDate_Click:
Exit Sub
Err_txtExpDate_Click:
MsgBox Err.Description
Resume Exit_txtExpDate_Click
End Sub