Full Version: Locking records after form is filled out
UtterAccess Forums > Microsoft® Access > Access Forms
Everettc4
Im looking for a way to keep users from accidently changing records after they have been recorded.
That we have is an invoice system for sales folks to generate invoices then I job cost and re-enter in our accounting software. What I what to do is put a button or field on the form that only I have access to that locks the record or prevents change depending if the box is selected or the field in not null. Does that make sense??
Thanks
I am also converting to access 2007 if there is more options there.
RAZMaddaz
What do you think of the idea of creating a logon form? You would have two text boxes: UserID and Password. There would also be a Command Button and when the User clicks on the Command button it would open your Invoice System form and based on the User ID, it would show or not show the button.
Everettc4
That would be ok but the same people that create the invoices are whom im trying to lock from making changes...
so how would this work..
do like the logon user stuff though
Thanks
cpwh1
I am in the same situation I have users filling out a order form. I would like to allow only the user who created the record to edit it, then after some time lock the record from all users. any suggestions would be really helpful thx.
bigdutch
On current event for the form do an if statement that says if the tickbox is true then enable=false for all the controls that have tag=Group1, and if tickbox=false the controls have enabled = true.
!--c1-->
CODE
Dim ctl as Object
If tickboxcontrol = True then
For each ctl in Me.Controls
If ctl.Tag = "Group1" Then
ctl.Enabled = False
End if
Next ctl
Else
For each ctl in Me.Controls
If ctl.Tag = "Group1" Then
ctl.Enabled = True
End if
Next ctl
End If

This will stop people changing them once you have transferred into the other system. To hide the tickbox from all users except you could at its most basic have two forms, one they use and one you use.
FOr more ideal an on current event that finds the current user is your username then enable the tickbox, look into fosusername() function.
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.