Return to Snippet

Revision: 9800
at November 23, 2008 10:44 by heislekw

Initial Code
Private Sub cmdTodayDate_Click()

On Error GoTo Err_Handler

     Dim strAnswer As String
     Dim temp As Date

    If Nz(Me.DateControl) <> "" Then
        strAnswer = MsgBox("Do you want to overwrite the existing date?", _
                    vbYesNo, "Date Exists")
        If strAnswer = vbNo Then
            Exit Sub
        End If
    End If

    Me.DateControl = Format(Now(), "short date")

    Exit Sub
    MsgBox "An error has occurred." & vbCrLf & _
            "Error Number: " & Err.Number & vbCrLf & _
            "Error Description: " & Err.Description, _
             vbCritical, "cmdTodayDate_click"
    Resume Exit_Handler
End Sub

Initial URL

Initial Description
Used with calendar button

Initial Title
Override Date Confirmation

Initial Tags

Initial Language
Visual Basic