Clerk Lock (1 Viewer)

billgyrotech

Banned
Local time
Today, 10:24
Joined
Apr 18, 2013
Messages
258
Hello,


I have a form AFRs. There is a Status field that is either "Open" or "Closed". When it's "Closed" all fields for that record cannot be edited including the AFRsParts tab which is good.


When the Status is "Open" all fields can be edited.


My request is:



Have the fields that the Clerk enters be locked and grayed out triggered by when the Clerk prints the Tear Down report (this will show they cannot be edited to the user) and have a button when they are this way to "Clerk Unlock" if needed:



AFR Number
SO Number
Received Date
Clerk
Customer
Description
Part Number
Serial Number
Customer Complaint
Preliminary Inspection
Warranty
Proper ID
Hidden Damage
Checked ADs
Checked SBs
Old Part Number
Old Serial Number


Thank you very much for your help in advance,
Bill
 
Last edited:

billgyrotech

Banned
Local time
Today, 10:24
Joined
Apr 18, 2013
Messages
258
Thank you Colin but it has too much going on for me. I am not sure how to apply to my situation.
 

isladogs

MVP / VIP
Local time
Today, 15:24
Joined
Jan 14, 2017
Messages
18,186
1. Import the entire module modControlState from my example spp to your own database
2. Assign the same Tag value e.g. CL (for ClerkLock) to all the controls you want to lock
3. In the event where you have code to open the report, add one or both of the following lines immediately afterwards
Code:
EnableControls False, "CL”
LockControls True, "CL"

Then in your button event, reverse the above
Code:
EnableControls True, "CL"
LockControls False, "CL"

That's all there is to it!
 

billgyrotech

Banned
Local time
Today, 10:24
Joined
Apr 18, 2013
Messages
258
I can copy that module to my database but I don't see how to include the fields to be locked. I can only see that this module will include all active fields.
 

billgyrotech

Banned
Local time
Today, 10:24
Joined
Apr 18, 2013
Messages
258
I suppose I can have different front ends:


One that has all fields locked (a read only version)
One that is for the Clerk to enter the initial data which has all fields unlocked
One that has the Clerk fields locked for the Technicians to fill out the rest of the fields
 

billgyrotech

Banned
Local time
Today, 10:24
Joined
Apr 18, 2013
Messages
258
With my limited ability maybe keep different front ends.


Thanks anyway Colin
 

isladogs

MVP / VIP
Local time
Today, 15:24
Joined
Jan 14, 2017
Messages
18,186
You can certainly make work for yourself by having different front ends.
You will then have ongoing additional work maintaining two sets of front ends so that both stay synchronised as further development work takes place.

However why do that when a simpler solution is available?
I listed all you need to do in my last post. Its easy and will take no more than a few minutes

To assign the Tag property, open the form in design view.
Select each of the form controls you want to lock - if you hold down the Ctrl key you can select them all at the same time.
Then go the the Other tab on the property sheet and enter the tag value e.g. CL

 

Attachments

  • Tag property.PNG
    Tag property.PNG
    28.8 KB · Views: 235
Last edited:

Gasman

Enthusiastic Amateur
Local time
Today, 15:24
Joined
Sep 21, 2011
Messages
14,044
I suppose I can have different front ends:


One that has all fields locked (a read only version)
One that is for the Clerk to enter the initial data which has all fields unlocked
One that has the Clerk fields locked for the Technicians to fill out the rest of the fields

I would not even give that a thought. You will only create much more work for yourself. At the best 3 different forms and even that would be a lot more work any time you changed one of the forms.

A little effort now will save you a lot of effort later on.
 

billgyrotech

Banned
Local time
Today, 10:24
Joined
Apr 18, 2013
Messages
258
Do I put "CL" in every field's tag value ?


I also don't see the Tag property like what you highlighted in #8
 
Last edited:

isladogs

MVP / VIP
Local time
Today, 15:24
Joined
Jan 14, 2017
Messages
18,186
You use the tag property of each of the form controls you want to lock...like I showed you in the screenshot.
You cannot do this in the design of the table.
 

billgyrotech

Banned
Local time
Today, 10:24
Joined
Apr 18, 2013
Messages
258
I do apologize for not being able to do what is easy for you but I cannot seem to make this work.
 

isladogs

MVP / VIP
Local time
Today, 15:24
Joined
Jan 14, 2017
Messages
18,186
I've noticed that you reach a certain point in threads then seem to give up saying 'its too difficult for me' and marking the thread solved.
If you are to become more proficient, you need to persevere.
In this case, I suggest you carefully study the example application and re-Read my detailed instructions.

It might be a good idea to watch the Access tutorials by Steve Bishop available free on You Tube.
 
Last edited:

billgyrotech

Banned
Local time
Today, 10:24
Joined
Apr 18, 2013
Messages
258
Your solution isn't working for me no matter what I have tried.



You can criticize me that is your choice and I am sorry that you feel this way.


I am not giving up and will keep trying to find the best solution for my situation.


Thanks


PS I have responded with my sincere appreciation for your help.
 
Last edited:

isladogs

MVP / VIP
Local time
Today, 15:24
Joined
Jan 14, 2017
Messages
18,186
I'm not criticizing you. Offering advice on how to progress further shouldn't be taken as criticism.
However, whilst I could do this for you, my policy is to provide guidance, not to provide a complete solution.
Good luck with your project.
 

Users who are viewing this thread

Top Bottom