Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2004
    Posts
    2

    Angry Unanswered: Automatic print date

    Hi, do you have a solution for the following problem that I have:

    I made a form with a print button in it and a date-field called: printdate.

    Is it possible to automatically get a date in the date-field as soon as I press the print-button?!!

    A lot of thanx

    Loeserd
    Access 2002, windows XP

    (sorry for my English!!!)

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Me.yourTextBox=Date()
    or
    Me.yourTextBox=Now

  3. #3
    Join Date
    Apr 2004
    Posts
    2

    Angry

    I think you got it, but.... where must I put it in the script: sorry, i am new with these kind of scripts!!

    ...........
    Private Sub Knop157_Click()
    On Error GoTo Err_Knop157_Click

    Dim strDocName As String
    strDocName = "Print_Com_Ind_all"
    DoCmd.OpenReport strDocName, acViewPreview, , "[Company]=Forms!searchCompany!Company"

    Exit_Knop157_Click:
    Exit Sub

    Err_Knop157_Click:
    MsgBox Err.Description
    Resume Exit_Knop157_Click

    End Sub
    ...........

  4. #4
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Originally posted by loeserd
    I think you got it, but.... where must I put it in the script: sorry, i am new with these kind of scripts!!

    ...........
    Private Sub Knop157_Click()
    On Error GoTo Err_Knop157_Click

    Dim strDocName As String
    strDocName = "Print_Com_Ind_all"
    DoCmd.OpenReport strDocName, acViewPreview, , "[Company]=Forms!searchCompany!Company"

    Me.yourTextBox=Date() ' Put it here

    Exit_Knop157_Click:
    Exit Sub

    Err_Knop157_Click:
    MsgBox Err.Description
    Resume Exit_Knop157_Click

    End Sub
    ...........

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •