temporary disable to edit fields

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Dear Sirs
I have a table with 15 records. I choosed a "table" - form layout for this
table to input data.
Since we have to enter a lot of data, it can happen that we are writing over
a record which already exist, because the typist is not always watching the
monitor. How is it possible to disable temporary editing after the data is in
the records.
 
The easiest way is to set the form's DataEntry property to True. That means
that existing records will not be shown.

If it's not acceptable not to show existing records, you could put code in
the form's BeforeUpdate event to reject the update if it's not a new record.
 
Dear Douglas,
Is there an easy SQL for this BeforeUpdate Event? - and can you give it to me?
 
Something like the following should work:

Private Sub Form_BeforeUpdate(Cancel As Integer)
If Me.NewRecord = False Then
Me.Undo
Cancel = True
End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top