By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,455 Members | 1,979 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,455 IT Pros & Developers. It's quick & easy.

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

George Tekos
P: 47
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
Dec 24 '11 #1

✓ answered by NeoPa

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.

Share this Question
Share on Google+
9 Replies


Narender Sagar
100+
P: 189
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.
Dec 24 '11 #2

George Tekos
P: 47
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?
Dec 24 '11 #3

Narender Sagar
100+
P: 189
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.
Dec 24 '11 #4

George Tekos
P: 47
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)?
Dec 24 '11 #5

George Tekos
P: 47
--sorry my first thought is wrong ..about the macro no1
Dec 24 '11 #6

NeoPa
Expert Mod 15k+
P: 31,186
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.
Dec 25 '11 #7

George Tekos
P: 47
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..
Dec 27 '11 #8

Narender Sagar
100+
P: 189
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.
Dec 28 '11 #9

George Tekos
P: 47
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 :)
Dec 28 '11 #10

Post your reply

Sign in to post your reply or Sign up for a free account.