Prevent edit after printing a form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • damola
    New Member
    • Sep 2010
    • 21

    #1

    Prevent edit after printing a form

    Good day everyone
    please i have a form, i want it to be such that i can use vba code to print report of the form and also prevent editing after the current record of the form has been printed.
    Thanks in advance
  • mshmyob
    Recognized Expert Contributor
    • Jan 2008
    • 903

    #2
    Create a field in your table that maybe is called IsPrinted and make it a Yes/NO field.

    After printing have the user verify that it printed correctly and if so then update the field in the table so it indicates that the record has been printed.

    Your form would check the IsPrinted field (probably put the code in the OnCurrent event) and if it has been printed then lock the controls on the form.

    cheers,

    Comment

    • damola
      New Member
      • Sep 2010
      • 21

      #3
      Thanks for your prompt response
      Please that is not what i want exactly
      I don't want manipulation of figures after printing a report, because one can decide not to tick "is printed" and manipulate the figures later on
      I want it such that as i click on print it prevent editing of the form
      would be glad if any help is rendered
      Thanks

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        You can't do this is Access.

        Comment

        • Rabbit
          Recognized Expert MVP
          • Jan 2007
          • 12517

          #5
          Let me rephrase. You can't do this without obfuscation of the data.

          If you were to encrypt all the data in the fields using a unique ID as a nonce and a private key, then you could in effect pull something like this off. You would need to use an MDE to hide the private key.

          Comment

          • Rabbit
            Recognized Expert MVP
            • Jan 2007
            • 12517

            #6
            I suppose another option would be to make a web based interface instead. In which the user would send the requests to the server. This way, no user would have direct access to the data.

            Comment

            • mshmyob
              Recognized Expert Contributor
              • Jan 2008
              • 903

              #7
              Same thing only different.

              Don't ask the user to confirm that it was printed correctly and just assign the value in the field as printed after clicking on the print button.

              As Rabbit pointed out unless you have an MDE or encrypt the data somehow no matter that you lock the controls a person can still go directly into the database file manually and modify data directly without any forms.

              But as I indicated earlier you can lock the forms and controls from editing by just checking the status of the ISPrinted flag.

              cheers,

              Comment

              Working...