• Change field value after printing (Access 2000)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Change field value after printing (Access 2000)

    Author
    Topic
    #379733

    After printing a report, I need to change the value of a yes/no field (Completed) in a table to true. I’m using Access 2000 with Win2000. I’ve tried the following: In the report design view, properties, on close – used expression builder to say Completed=true. We’ve also used the code builder for the report onclose property to say table name.Completed=true.

    Results we got were:
    On the report design view expression builder, we get the error that the object doesn’t contain the automation object.

    In the code builder, we get a compile error.

    Any help will be appreciated.

    Viewing 0 reply threads
    Author
    Replies
    • #633250

      What you could do is put the following code into the OnClose event:
      Dim strSQL as string
      strSQL = “UPDATE Tablename SET Completed = True WHERE somecondition”
      DoCmd.RunSql strSql

      Substitute your tablename and somecondition.

      HTH
      Pat smile

    Viewing 0 reply threads
    Reply To: Change field value after printing (Access 2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: