edit only new record and disable autosave in continuous subforms

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dzulai
    New Member
    • Feb 2007
    • 2

    edit only new record and disable autosave in continuous subforms

    i have a continuous subform and its AllowAdditons and AllowEdits property are set to false. A command button("Add") in my main form sets both properties to True, enabling the New Record to appear. My question is, is it possible to limit edits only to the new record? and also, is it possible for the new record not to be saved automatically to the DB? The new record must only be saved when the "Save" command button is clicked. thanks
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    If you change the setting of Data Entry to yes then they can only add new records and edit those new records added.

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32645

      #3
      I think that, unfortunately, that will also stop the other records from displaying. I'm not sure that's what the OP was planning on.
      If that doesn't solve the problem then try intercepting the attempts to update in the BeforeUpdate event procedure and set Cancel = True in those circumstances you don't wish a save to happen.

      Comment

      • Keriana30
        New Member
        • Nov 2007
        • 7

        #4
        Originally posted by NeoPa
        I think that, unfortunately, that will also stop the other records from displaying. I'm not sure that's what the OP was planning on.
        If that doesn't solve the problem then try intercepting the attempts to update in the BeforeUpdate event procedure and set Cancel = True in those circumstances you don't wish a save to happen.
        Unfortunately, I am having the same problem and when I set Cancel = True in the subforms before update event, it will not allow the subform to lose focus until that data is saved. I have a form with several tabs. Each tab contains different information regarding the employee. I need to be able to edit the information without it saving until a master save button on the main form is clicked. It is horribly redundant to perform edit and save functions for each individual subform. If anyone can help with this, would appreciate it.

        Comment

        • NeoPa
          Recognized Expert Moderator MVP
          • Oct 2006
          • 32645

          #5
          If your situation is that you want the overall form to enable editing of a single record, which is split across various pages (tabs), then I think perhaps using subforms is where you're going wrong (as opposed to controls on the main form being within your pages directly). If not, then you need to start a new thread as this is a separate question, and posting your question in another, albeit related, thread is not allowed (I can see this is your first post so just explaining and not criticising). If this is the case then simply post so here & I can split this for you and we can deal with your case in detail.

          PS. I've just seen your other thread (How to stop subforms from autosaving upon losing focus?) so I probably don't need an answer to this. I'll let that thread continue in place of this one.

          Comment

          • Keriana30
            New Member
            • Nov 2007
            • 7

            #6
            Thanks for your help.

            Comment

            Working...