Access webDB form- automatically updates the records, if i switch tab

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • George Tekos
    New Member
    • Dec 2011
    • 47

    Access webDB form- automatically updates the records, if i switch tab

    I have a WEB enabled Access 2010 database, uploaded on a sharepoint site. the database contains 3 form and a 1 navigation form. The navigation form is the first to show up in the browser, and has the role of presenting the rest 3 forms, as tabs. So you first enter the navigation form and then navigate by choosing the tab you want.OK with that..

    One tab is a form that submits data to the database. BUT> if i choose this tab >after> enter a random value to a random field >after> abandon the form by choosing another tab (like quiting, so its WITHOUT PRESSING the "submit" button) the tab changes, BUT the record updates..
    this is something i dont want... does anyone know how can i avoid that
  • Narender Sagar
    New Member
    • Jul 2011
    • 189

    #2
    You can set 'required' property to "Yes" for an important field/s in the table. Until & unless you maintain proper record in that field/s data will not be saved. That way you can easily control that.

    Comment

    • George Tekos
      New Member
      • Dec 2011
      • 47

      #3
      the form contains courses' fields, a date picker (that has a default value =date() , and two buttons (submit, exit)
      i cant make any of the courses lesson required for obvious reasons (maybe one day this course is not taught)
      i cant make the button-pressing required i guess,
      so the only way is to leave the date blank and put there the "required" right?

      Comment

      • Narender Sagar
        New Member
        • Jul 2011
        • 189

        #4
        Its better to set 'Required' property in tables, instead of doing it in forms. If Date is the only field, then, Yes, may be that will be the only option.

        Comment

        • George Tekos
          New Member
          • Dec 2011
          • 47

          #5
          yes i meant to set it in the table so i have the option of setting a custom message if the rule is not ok.
          i was thinking of setting something like a macro saying "if (the button submit IS NOT pressed,delete all inputs)" or "if (the other tabs are pressed, delete all inputs" something like this..ofcourse the syntax is wrong but jsut to explain you... would it work(if applicable)?

          Comment

          • George Tekos
            New Member
            • Dec 2011
            • 47

            #6
            --sorry my first thought is wrong ..about the macro no1

            Comment

            • NeoPa
              Recognized Expert Moderator MVP
              • Oct 2006
              • 32662

              #7
              The form will probably have a BeforeUpdate event procedure. If you ensure that the Cancel parameter is always set to True unless the update is triggered by the code behind the Submit button then that should give you what you're after.

              Comment

              • George Tekos
                New Member
                • Dec 2011
                • 47

                #8
                I found the solution>>
                there is the navigation form's panel (typically the buttons on the left). every button is one form. if you press another button in the middle of a form's completion, the form switches and if not any ristriction, submits the data(something i didnt want).BUT
                if you make the form open by a button, then the only available
                form-opening-method is "dialog"... so it opens the form you choose, in a dialog boz, where you have no option to press something else, except for SUBMIT it and EXIT...
                so it works perfect!!
                Also, many many bugs if you use sharepoint with IE and CHROME...many..

                Comment

                • Narender Sagar
                  New Member
                  • Jul 2011
                  • 189

                  #9
                  George, I'll call it as a 'workaround' for doing this. This is not fool proof. What NeoPa advised is best practice, for sure.
                  In any database, there are numerous ways to achieve your aim, but what is the best practice is something that matters.
                  However, if it serve your purpose, then you can close this thread.

                  Comment

                  • George Tekos
                    New Member
                    • Dec 2011
                    • 47

                    #10
                    i obviously respect 1)when someone responds to my thread2)the answer itself..
                    actually the popup of the form is better as a solution for me. Probably not for everyone.
                    thank you again :)

                    Comment

                    Working...