Make records read only based on specific field value

spectraflame

Well-known Member
Joined
Dec 18, 2002
Messages
830
Office Version
  1. 365
Platform
  1. Windows
I would like to be able to open records as read only if the STATUS field contains the value of CLOSED. If the field contains the value of OPEN, I would like to be able to modify the record until the status is changed. My hopes are that once the work order is closed, the record will be read only unless the password protected modify button is clicked.

Thanks,
Matthew
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Create 2 forms, one read only and one ADD mode, base them on 2 queries, one with parameter to open and one with parameter to closed.

Jobs a gud-en!
 
Upvote 0
Why not create code that checks that field when the record is opened?

It could then lock the record as required.
 
Upvote 0
Norie,

Your suggestions sounds logical. Would it be the easiest to create an On Open event for that specific form that if the status = CLOSED the ENABLED setting for each box would = FALSE and if the status = OPEN, then open the record as normal?

Matthew
 
Upvote 0
Matthew

I'm not sure which event would be best.

It depends on how your form is set up.

On Open might work for a single view form.

But On Current might be a better idea.

Another option could be to have the records read only as default and only allow editing view a command button that checks for a password and the status.
 
Upvote 0

Forum statistics

Threads
1,221,893
Messages
6,162,659
Members
451,780
Latest member
Blake86

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top