Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2004
    Posts
    42

    Unanswered: How do I to change a record one it is printed.

    I want to mark a record printed after printing it.

    I pretty sure that this is possible but I am not sure where to start.

  2. #2
    Join Date
    Aug 2002
    Location
    Melbourne, Australia
    Posts
    111
    Have a look at the attached sample.
    Attached Files Attached Files
    Regards,



    John A

  3. #3
    Join Date
    Apr 2004
    Posts
    42
    John,

    Thanks for the example. That was how I pretty much did it.

    Thanks again.

  4. #4
    Join Date
    Aug 2002
    Location
    Melbourne, Australia
    Posts
    111
    That was how I pretty much did it.
    If you did not do it the same, how did you do it? I just like to learn new methods or way to do things.
    Regards,



    John A

  5. #5
    Join Date
    Apr 2004
    Posts
    42

    The Code

    John,

    The only thing I really did differently was add an option to have the user cancel the update query if the report doesn't print properly.

    I guess I also added a msg box to show how many record were updated.

    Thanks again for your example.

    Brian

    Private Sub Report_Close()

    Dim stDocName As String
    Dim stLinkCriteria As String
    Dim Msg, Style, Title, response, MyString
    Dim db As Database
    Set db = CurrentDb

    stDocName = "frmMain"

    Msg = "Did the Grow Cards print OK and do you want to update the file that it has been printed?" ' Define message.
    Style = vbYesNo + vbCritical + vbDefaultButton2 ' Define buttons.
    Title = "Cancel the Update Query" ' Define title.
    response = MsgBox(Msg, Style, Title)
    If response = vbYes Then ' User chose Yes.
    db.Execute "qryCardUpdate", dbFailOnError
    MsgBox db.RecordsAffected & " Records Updated"
    DoCmd.OpenForm stDocName, , , , , , stLinkCriteria
    Else
    End If
    Set db = Nothing
    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
  •