Editing by mistake

E

-elli-

Hi there!
I'm totally new with Access and just starting to figure out how to move
everything from Lotus to MS Office...
The first problem is (as it was in Lotus too) that if for instance a user
opens a database and f.i. a form in it. And by accident makes changes to it.
Then closes the form and all the changes will be saved too. Is it true? Is
there any way to prevent that????
If so in the end I end up with a useless database....
Every hint is more than welcomed...

-ellin00ra-
 
K

KARL DEWEY

It is worse than you expressed - the change is usually recorded as soon as
you leave the field - press enter key or tab.
You can do several things - all according to how error prone the data entery
person is expected to be.
You can create a temporary record of all the changes and not apply using an
update query until the supervisor/checker has verified everything.
You can make sure you keep daiy backups for data recovery and all the
hardcopy data entry sheets for so many days.
 
R

Rick Brandt

KARL DEWEY said:
It is worse than you expressed - the change is usually recorded as soon as
you leave the field - press enter key or tab.

Actually that is incorrect. The changes are normally not commited to disk until
you leave the record or close the form.
 
G

Gary Miller

Elli,

Access if very flexible. You can set a form not to Allow any
Edits, or Deletions, or Additional Records all as separate
options. You will find these options in the Properties box
of the form. With VBA code (or macros I suppose) you can
toggle these on and off as needed. Without code you could
also make one copy of your form where you don't allow any
changes and then another where you do.

Also, if a user is in a form and accidentally makes changes,
pressing ESC once will undo a change to the field they are
in and pressing ESC twice should undo any changes to the
whole record as long as you have not yet moved to another
record.
 
L

Larry Daugherty

You can defend your application against what you perceive the be the
greatest risk. First of all, hide your database window and move your
tables out of the view of casual players. Make your forms "read only"
by fiddling the properties and only enable for Data Entry or Edit by
specific command buttons. Another thing is to capture the user's ID
and associate it with the record by inserting it in the record at the
form's before update event. That will allow you traceability to
see/report who is fiddling the data. Just announcing that you can
track who entered which data can put a chill on people fiddling
around.

HTH
 
C

Conrad

Well in my humble opinion there are at least two ways to go here. Code the
form so that it is not bound to the dataset or code the form to have the
controls locked until the user clicks an "Edit" button to unlock them. Then
at that point the user knows darn well they are updating something.

Let me know if you need any assistance with the code.
 
E

-elli-

Hi Conrad!
If it's not too much effort I would really appreciate Your help with the
code. Your solution sounds great!
As I told You I'm just a beginner with Office Apps. But doing is learning
isn't it?;)


-elli-

"Conrad" kirjoitti:
 
C

Conrad

Ok lets try something like this. When you design your form set the Enabled
property to No on any objects you want "locked" except for an "Edit" button.
For the on click event for the "Edit" button place the following code.

Dim ctl As Control
Dim intAnswer as Integer

intAnswer = MsgBox("You are about to edit a record, continue?", vbYesNo,
"Continue?")
If intAnswer = 6 Then
'Initially all controls are made to be enabled.
For Each ctl In Me.Controls
If ctl.ControlType = actextbox Then
ctl.Enabled = True
End If
Next
End If

Let me know how it goes.
 
Top