Solved Lock tick box after i have ticked it

rainbows

Registered User.
Local time
Yesterday, 20:35
Joined
Apr 21, 2017
Messages
428
i have a tick box on each order line when i have ordered the parts i tick the parts ordered box . how can i prevent anyone from removing the tick.

thanks steve


1675499540383.png
 
Example:
Code:
private sub Form_Current()

    with me.YourCheckBox
         .Locked = Nz(.Value, False)
    end with
    
end sub
 
how can i prevent anyone from removing the tick
what if you ticked the wrong Record and want to Undo (when record already been saved)?

what i would do, is create a separated table (therefore, separated form) for those Ordered.
 
if its the wrong record , they would have to tell admin who then could hopefully undo it in the table ? unless we could password it to unlock it ?
 
here is a demo of "asking" for password on Locked field.
see the code on "Parts Ordered" MouseDown event.
 

Attachments

thank you , that works great . each line has an order for a part ( assembly) with a date for when it is going to be completed , each assembly has a bill of materials . the system looks at all the parts for the next month and collates all the materials to purchase . these materials are bought to stock the only way i knew of is to tick that box so it dont order them parts over and over again . not great but i did not know of any other way , albeit it works

steve
 
not great but i did not know of any other way , albeit it works
no system is Perfect (even Microsoft keep on giving Updates), so if it works for you, Go.
 
You could test the user, so that only yourself (or other designated users) could undo the tick
You could warn users before unticking the tick box.

The best way to do it is this though. Rather than have a tick box y/n stored in the table at all you could set the status of the tickbox value by testing whether an order has been placed or not. (but that may be somewhat tricky given the complicate nature of your "order").
 
If that is a continuous form, you might have a problem because continuous forms behave differently than non-continuous ones. Locking one column might lock all columns at once if you are not careful. If you track the date on which an order was placed, checking for the date - to be empty or not - might be a better way to handle things.
 

Users who are viewing this thread

Back
Top Bottom