Single records read only

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

Guest

I wasn't able to find my question on another post so please help.
I have a database that my team of 4 use to track our projects and time
working the projects. about once a week, the first record in the
table/database gets written over. I know it's someone's mistake by not
looking at what they are doing, but it is damaging our data. Is there a way
that I can add a check box to the form and table that if checked, it makes
this record read only, and not the whole database. I have very basic
knowledge with Access so if you can give me step by step instruction, it
would be greatly appreciated. Also, I need the new check box editable, so if
changes need to be made to the record, I can uncheck the box and make edits,
and lock again by checking. (Both the form and table need to lock.)

Thank you in advance.
 
Annemarie said:
I wasn't able to find my question on another post so please help.
I have a database that my team of 4 use to track our projects and time
working the projects. about once a week, the first record in the
table/database gets written over. I know it's someone's mistake by not
looking at what they are doing, but it is damaging our data. Is there
a way that I can add a check box to the form and table that if
checked, it makes this record read only, and not the whole database.
I have very basic knowledge with Access so if you can give me step by
step instruction, it would be greatly appreciated. Also, I need the
new check box editable, so if changes need to be made to the record,
I can uncheck the box and make edits, and lock again by checking.
(Both the form and table need to lock.)

Thank you in advance.

I would believe (have not tried it) you could run a routine ever time
the data was refreshed that would look for that specific field and if it was
checked to set the form properties for edit or delete to no or yes as
indicated.
 
When you say "I can uncheck the box and make edits...", do you mean
specifically you and no other users? If you do, then you can open the form
in design mode and open the Properties window (icon with a finger pointing at
a page) for the form. In the Data tab, change Allow Edits to No. Save the
form and give it to the other users.

If you don't mean you specifically, I think that presenting a warning message
might be a better way to go. In design mode of the form, select the first
control; I'm assuming that people just open the form and start typing in this
control. Open the Properties window for the control and go to the Event tab.
Use the After Update event with an [Event Procedure]:

Dim strMsg as String
Dim i as Integer

If Me.FirstControl <> Me.FirstControl.OldValue Then
strMsg = "Are you sure you want to change the value?"
i = MsgBox(strMsg, vbYesNo, "Verification Required.")
If i = 7 Then
Me.FirstControl = Me.FirstControl.OldValue
End If
End If
 
Joseph said:
I would believe (have not tried it) you could run a routine ever
time the data was refreshed that would look for that specific field
and if it was checked to set the form properties for edit or delete
to no or yes as indicated.

Of course this would only work if everyone used the form
 

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