How to stop this popup msg ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chinfk
    New Member
    • Oct 2007
    • 15

    How to stop this popup msg ?

    I has a combo-box in the form, that after update event it keep on pop up below msg :

    "The data has been changed. Another user edited this record and saved
    the changes before you attempted to save your changes. Re-edit the
    record."

    How can i stop this ?

    Thanks for advanced.
  • nico5038
    Recognized Expert Specialist
    • Nov 2006
    • 3080

    #2
    Microsofts explanation is:


    Is your form based on a linked table ?

    Nic;o)

    Comment

    • missinglinq
      Recognized Expert Specialist
      • Nov 2006
      • 3533

      #3
      And maybe a peek at the combo-box's AfterUpdate event so we can see what it's doing.

      Welcome to TheScripts!

      Linq ;0)>

      Comment

      • chinfk
        New Member
        • Oct 2007
        • 15

        #4
        My after update has below code : (No subform)

        DoCmd.SetWarnin gs False
        DoCmd.RunSQL "DELETE [Temp-OrderHeader].* FROM [Temp-OrderHeader];"
        DoCmd.RunSQL "DELETE [Temp-OrderDetail].* FROM [Temp-OrderDetail];"
        DoCmd.RunSQL "INSERT INTO [Temp-OrderHeader] ( Type, ORDNO, SYSDATE, MODEL, SUBJECT, ORDDATE, ETA, REV, PACK, ETA2, REMARK1, REMARK2, REMARK3, REMARK4, REMARK5, REMARK6, Location ) SELECT OrderHeader.Typ e, OrderHeader.ORD NO, OrderHeader.SYS DATE, OrderHeader.MOD EL, OrderHeader.SUB JECT, OrderHeader.ORD DATE, OrderHeader.ETA , OrderHeader.REV , OrderHeader.PAC K, OrderHeader.ETA 2, OrderHeader.REM ARK1, OrderHeader.REM ARK2, OrderHeader.REM ARK3, OrderHeader.REM ARK4, OrderHeader.REM ARK5, OrderHeader.REM ARK6, OrderHeader.Loc ation FROM OrderHeader WHERE (((OrderHeader. ORDNO)=[Forms]![OrderDelete]![OrdInfo]));"
        DoCmd.RunSQL "INSERT INTO [Temp-OrderDetail] ( ORDNO, LOTNO, PARTNO, CUSTPARTNO, SSNO, ESNO, SHIPQTY, HEADCODE, REMARK, REV,REASON ) SELECT OrderDetail.ORD NO, OrderDetail.LOT NO, OrderDetail.PAR TNO, OrderDetail.CUS TPARTNO, OrderDetail.SSN O, OrderDetail.ESN O, OrderDetail.SHI PQTY, OrderDetail.HEA DCODE, OrderDetail.REM ARK, OrderDetail.REV , OrderDetail.REA SON FROM OrderDetail WHERE (((OrderDetail. ORDNO)=[Forms]![OrderDelete]![OrdInfo]));"
        Me.Requery
        DoCmd.SetWarnin gs True
        Me.Detail.Visib le = True
        Me.Type.SetFocu s

        Please have an advice for me to block the popup msg .... thanks.

        Comment

        • nico5038
          Recognized Expert Specialist
          • Nov 2006
          • 3080

          #5
          Is your form with the combo perhaps bound to Temp-OrderHeader and/or Temp-OrderDetail ?

          Nic;o)

          Comment

          • chinfk
            New Member
            • Oct 2007
            • 15

            #6
            Yes it is bound to order header

            Comment

            • nico5038
              Recognized Expert Specialist
              • Nov 2006
              • 3080

              #7
              Hmm, then you have a problem when deleting and inserting rows as the form is bound to the table(s) you're manipulating.
              One option is to manage the delete and insert before showing the form.
              Can't you place the code "behind" the button that's opening the form?
              That way the "fresh" data is already in place when the form opens.

              Nic;o)

              Comment

              • chinfk
                New Member
                • Oct 2007
                • 15

                #8
                Thks for the advice, i hav find the reason why it popup by disable or remark the
                delete temp table in cancel button.

                So by doing that when user select the order it won't pop up that msg again.

                Thanks again n hav a nice day ya. =)

                Comment

                Working...