Go Back   Access World Forums > Microsoft Access Discussion > Forms

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 06-18-2019, 03:23 AM   #1
billgyrotech
Banned
 
Join Date: Apr 2013
Posts: 258
Thanks: 67
Thanked 3 Times in 3 Posts
billgyrotech is an unknown quantity at this point
Clerk Lock

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 by billgyrotech; 06-18-2019 at 12:33 PM.
billgyrotech is offline   Reply With Quote
Old 06-18-2019, 04:14 AM   #2
isladogs
High Noon Moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 11,919
Thanks: 120
Thanked 3,326 Times in 3,002 Posts
isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold
Re: Clerk Lock

This is easily achieved using the Tag property.
Assign the same Tag value to all the controls you want to disable/lock at the same time
See my example database as mentioned by Uncle Gizmo in a previous thread
http://www.mendipdatasystems.co.uk/s...ols/4594398114
__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Colin (Mendip Data Systems)
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Common sense and a sense of humour are the same thing, moving at different speeds. (Clive James - RIP)
isladogs is offline   Reply With Quote
Old 06-18-2019, 04:44 AM   #3
billgyrotech
Banned
 
Join Date: Apr 2013
Posts: 258
Thanks: 67
Thanked 3 Times in 3 Posts
billgyrotech is an unknown quantity at this point
Re: Clerk Lock

Thank you Colin but it has too much going on for me. I am not sure how to apply to my situation.

billgyrotech is offline   Reply With Quote
Old 06-18-2019, 05:21 AM   #4
isladogs
High Noon Moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 11,919
Thanks: 120
Thanked 3,326 Times in 3,002 Posts
isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold
Re: Clerk Lock

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!
__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Colin (Mendip Data Systems)
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Common sense and a sense of humour are the same thing, moving at different speeds. (Clive James - RIP)
isladogs is offline   Reply With Quote
Old 06-18-2019, 05:31 AM   #5
billgyrotech
Banned
 
Join Date: Apr 2013
Posts: 258
Thanks: 67
Thanked 3 Times in 3 Posts
billgyrotech is an unknown quantity at this point
Re: Clerk Lock

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 is offline   Reply With Quote
Old 06-18-2019, 06:39 AM   #6
billgyrotech
Banned
 
Join Date: Apr 2013
Posts: 258
Thanks: 67
Thanked 3 Times in 3 Posts
billgyrotech is an unknown quantity at this point
Re: Clerk Lock

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 is offline   Reply With Quote
Old 06-18-2019, 06:53 AM   #7
billgyrotech
Banned
 
Join Date: Apr 2013
Posts: 258
Thanks: 67
Thanked 3 Times in 3 Posts
billgyrotech is an unknown quantity at this point
Re: Clerk Lock

With my limited ability maybe keep different front ends.


Thanks anyway Colin

billgyrotech is offline   Reply With Quote
Old 06-18-2019, 07:21 AM   #8
isladogs
High Noon Moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 11,919
Thanks: 120
Thanked 3,326 Times in 3,002 Posts
isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold
Re: Clerk Lock

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

Attached Images
File Type: png Tag property.PNG (28.8 KB, 108 views)
__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Colin (Mendip Data Systems)
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Common sense and a sense of humour are the same thing, moving at different speeds. (Clive James - RIP)

Last edited by isladogs; 06-18-2019 at 03:01 PM.
isladogs is offline   Reply With Quote
Old 06-18-2019, 07:39 AM   #9
Gasman
Enthusiastic Amateur
 
Gasman's Avatar
 
Join Date: Sep 2011
Location: Swansea, South Wales,UK
Posts: 4,787
Thanks: 455
Thanked 904 Times in 868 Posts
Gasman is a jewel in the rough Gasman is a jewel in the rough Gasman is a jewel in the rough
Re: Clerk Lock

Quote:
Originally Posted by billgyrotech View Post
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.
__________________
Access novice. Sometimes trying to give something back.
Access 2007

Please, please use code tag # when posting code snippets

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Gasman is online now   Reply With Quote
Old 06-18-2019, 07:55 AM   #10
billgyrotech
Banned
 
Join Date: Apr 2013
Posts: 258
Thanks: 67
Thanked 3 Times in 3 Posts
billgyrotech is an unknown quantity at this point
Re: Clerk Lock

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 by billgyrotech; 06-18-2019 at 08:00 AM.
billgyrotech is offline   Reply With Quote
Old 06-18-2019, 08:08 AM   #11
billgyrotech
Banned
 
Join Date: Apr 2013
Posts: 258
Thanks: 67
Thanked 3 Times in 3 Posts
billgyrotech is an unknown quantity at this point
Re: Clerk Lock

Thanks for trying to help.
billgyrotech is offline   Reply With Quote
Old 06-18-2019, 08:22 AM   #12
isladogs
High Noon Moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 11,919
Thanks: 120
Thanked 3,326 Times in 3,002 Posts
isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold
Re: Clerk Lock

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.
__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Colin (Mendip Data Systems)
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Common sense and a sense of humour are the same thing, moving at different speeds. (Clive James - RIP)
isladogs is offline   Reply With Quote
The Following User Says Thank You to isladogs For This Useful Post:
billgyrotech (06-18-2019)
Old 06-18-2019, 08:28 AM   #13
billgyrotech
Banned
 
Join Date: Apr 2013
Posts: 258
Thanks: 67
Thanked 3 Times in 3 Posts
billgyrotech is an unknown quantity at this point
Re: Clerk Lock

I do apologize for not being able to do what is easy for you but I cannot seem to make this work.
billgyrotech is offline   Reply With Quote
Old 06-18-2019, 08:32 AM   #14
isladogs
High Noon Moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 11,919
Thanks: 120
Thanked 3,326 Times in 3,002 Posts
isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold
Re: Clerk Lock

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.
__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Colin (Mendip Data Systems)
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Common sense and a sense of humour are the same thing, moving at different speeds. (Clive James - RIP)

Last edited by isladogs; 06-18-2019 at 08:35 AM. Reason: Fixed incomplete post
isladogs is offline   Reply With Quote
Old 06-18-2019, 08:35 AM   #15
billgyrotech
Banned
 
Join Date: Apr 2013
Posts: 258
Thanks: 67
Thanked 3 Times in 3 Posts
billgyrotech is an unknown quantity at this point
Re: Clerk Lock

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 by billgyrotech; 06-18-2019 at 11:15 AM.
billgyrotech is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA to Capture Windows lock and Un-lock timings in Access 2010 rd.prasanna Modules & VBA 1 11-12-2017 06:53 AM
lock down elmister Forms 2 12-04-2009 01:13 PM
LDB lock on myself gabryyl General 2 02-20-2009 01:27 PM
DB Lock am_sarath Modules & VBA 1 02-07-2002 04:06 AM
[SOLVED] Num Lock RVP Macros 0 12-27-2000 12:58 AM




All times are GMT -8. The time now is 01:11 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World