Results 1 to 9 of 9
  1. #1
    Join Date
    Apr 2006
    Posts
    157

    Unanswered: I swear I can't detect how this could be a permission problem

    Hi everyone,

    please bear with me as I try to painfully break this down to everyone of you
    ms access 2003 version, database

    On a form, I have a subform displaying bill of materials(BOM)

    On the subform's before_update event, i have this :
    Code:
    If MsgBox("Do You Want to Save the Current Changes?", vbYesNo + vbQuestion, "Save Comment") = vbYes Then
            DoCmd.Save
        Else
            Me.Undo
        End If
    I can't remember now exactly why I maintained that structure, but anyway, it works when using my admin account

    and throws an error on the DoCmd.Save when using non admin account

    Additional info:

    add/edit/delete on the table behind the form is permissible for admin and non-admin account... i've tried it and it worked
    ... and yes, i've checked the permissions both on the front end as well as the back end and they're fine

    Furthermore:
    I've created a dummy account, when included in Admins group, no error occurs



    hope you guys find this to be challenging, and help me grind out of this, it's ... just...
    well, not completely illogical

    thanks guys, looking forward to some of your thoughts on this
    Only quitters quit!

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    docmd.save has got nothing at all to do with saving your data!
    - it attempts to save the object (your form).

    ...can non-admins save form design changes??

    izy
    currently using SS 2008R2

  3. #3
    Join Date
    Apr 2006
    Posts
    157
    i just went as far as providing administering permissions on the form and subform for the user group, and same results observed
    Only quitters quit!

  4. #4
    Join Date
    Jan 2007
    Location
    California, USA
    Posts
    520
    if you are trying to save the record, that would be

    DoCmd.RunCommand accmdSaveRecord

    That should keep it working for the non-admins

  5. #5
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    ...maybe.
    i don't use the A security stuff so i'm not the one to comment.

    if your intention is to 'Save Comment' (i.e. data) as suggested by your msgbox title, you shouldn't be using docmd.save since this is only for object design saves.

    maybe you can defer working out why the user group can't save design changes until some future date when it becomes important. in my world, i don't allow users to design-modify forms.

    izy

    my 'maybe' relates to 'and same results observed', not to Vic's post.
    currently using SS 2008R2

  6. #6
    Join Date
    Apr 2006
    Posts
    157
    just tried the runcommand, as well as access's default line for a save command

    anyway, it conflicts,... the macro or f(x) in the before update is preventing ms access from saving the data in the field
    Only quitters quit!

  7. #7
    Join Date
    Apr 2004
    Location
    Derbyshire, UK
    Posts
    789
    Provided Answers: 1
    Hi

    It may be me, but if this code is in the before update event then shouldn't it be somethink like

    Private Sub Form_BeforeUpdate(Cancel As Integer)
    If MsgBox("Do You Want to Save the Current Changes?", vbYesNo + vbQuestion, "Save Comment") = vbNo Then Me.Undo
    End Sub

    If you do not undo (or Cancel) it, it will be save by definition as it is the BEFORE UPDATE (ie save) event.

    ??


    MTB

  8. #8
    Join Date
    Apr 2006
    Posts
    157
    yah, that's the quick fix i did,

    but for some reason, i'm 100% sure there was some justification why i turned it into an if then else, i created this probably a year ago, but wasn't nice enough to insert some comments

    but i just know there was some reason why i still did that save thingy

    it seems to work fine now, but, i just have a feeling it will blow up anytime soon
    Only quitters quit!

  9. #9
    Join Date
    Apr 2006
    Posts
    157
    sorry for double posting,

    but what i'm still after in here, is why the code works for the admin, while i've checked all permissions and tried to synchronize for the group and the admin permissions for the involved objects

    and still come up with error
    Only quitters quit!

Posting Permissions

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