How can I make form a template

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Marie Hall
    New Member
    • Oct 2010
    • 6

    How can I make form a template

    I have designed a database to keep track of equipment calibrations. I have designed a form. I would like to enter entries on the form but I don't want anyone to be able to adjust an entry after it has been entered. How can I make the form just a template and the entries sent to another read only form.
  • Mariostg
    Contributor
    • Sep 2010
    • 332

    #2
    I think there are quite a few ways you can do that. The first one that comes to my mind would be to check who is the current user then grants allow insert/update/delete/ of records if user is say "MarieHall" or whatever your computer login is:
    Code:
    Private Sub Form_Open(Cancel As Integer)
        Me.AllowAdditions = False
        Me.AllowDeletions = False
        Me.AllowEdits = False
    If Environ("username") = "MarieHall" Then
        Me.AllowAdditions = True
        Me.AllowDeletions = True
        Me.AllowEdits = True
    End If
    End Sub
    Other option would be to have two forms... One for you and one that would be read only for your users. But you need to prevent other user from using your editable form. You could hide it, but it is not fullproof. Nor is the solution above.

    Ultimately, yo could use MS Access security features to set user's permission. But that maybe beyond what you want.

    Comment

    • Marie Hall
      New Member
      • Oct 2010
      • 6

      #3
      Hi Mariostg,
      I'm relativley new working with access and I'm so thankful that we have a place like "Bytes" that can help in solving our problems.
      Creating two forms ...would probably be the way that I would want to go. Could I create a form that an employees could fill out that could be sent to a second read only form? If so, how would you recommend I go about taking the form I already have and make it into two separate one?

      Thank,

      Mariah

      Comment

      • Mariostg
        Contributor
        • Sep 2010
        • 332

        #4
        If you decide to go with the two forms option, understand that the public form does not send the data to the private form. It is just that each form share the same data source. One form accepts Read, Insert, Delete and Update actions while the other form just accept Read action.

        This is rather easy to set up. Let's call the forms Public and Private. Copy your Public Form (Ctrl+C), paste it (Ctrl-V). It will ask for a name. Let's call it Private. Go on design mode for the Public form and under the data tab properties, set Allow Edits, Allow Deletions, Allow Additions to No. Save the form and give it a try.

        Comment

        Working...