Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2008
    Posts
    12

    Unanswered: Unlock Post macroing help

    Hey all.

    Im new to Acces and im trying to create a macro, a rathe rcomplicated job for someone as inexperienced as me.

    Im creating a large database, which is to be used by others aswell. The data im storing is rather important, so id like a button which u have to click in order to edit a specific post. This is to prevent a pesron from simply overwriting the first (or last) post in the database when trying to create a new post.

    Anyone who can guide me through it?

    Big thanks

  2. #2
    Join Date
    May 2008
    Location
    Raleigh, NC
    Posts
    151

    You might try.....

    somthing like this.

    I don't know how you are displaying your 'posts' (I'm assuming posts are a column in a record) so I'll probably make an assumption or two.

    I generally use a form with only the high level data, like the site, or purchase order on it, and then have a subform that relates to them with all of the specific data. The subform is set to 'continuous forms' so all of the records are displayed in a 'table-like' manner. All of the fields in the subform are set to locked so you can't accidently change anything. Each record has a button on the subform which will bring up a modal form that has each of the fields in the unlocked mode.

    Doing it this way keeps the user from accidently typing something into a field and forces them to click a specific button in order to change anything. My logic is that if they take the time to click something they actually want to change it.

    When the user closes the modal form I have the code requery the subform and the changes are then there to view.

    Hope this helps, Stu
    --If its free, take it for what its worth!

  3. #3
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    All I do is have Before Update look at an option button, and Cancel if it hasn't been clicked. Pretty simple, but I like it.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  4. #4
    Join Date
    Oct 2008
    Posts
    12
    Thx for the help u guys

  5. #5
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    You can try the example in this post: http://www.dbforums.com/showpost.php...9&postcount=68

    It basically uses a "User" table which has a "Security" field (int)

    When you open the form, depending on your security level (a function to return your loginID and security level) it will then lock some buttons or make invisible others, etc..

    Feel free to utilize any of techniques in this example into your own.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

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