Protecting Check Boxes on a Form

JasonTruman

Board Regular
Joined
Sep 30, 2003
Messages
85
Hi

An Access question on MrExcel.com - what is the world coming to ?

Anyway, hopefully someone can help.

I have a check box and a date field on a form (of course bound to a table). eg. the check box is an Approval option (Yes or No) and the date box being when it was approved (ie today's date).

So, once a tick is put into the check box I want an automatic date to appear with the date being today. I then want the date box and check box to become uneditable to stop anyone changing the information. The only way I want it to be changed is via the table. Security is setup to stop the users viewing the table as I want to control who has access to the raw live data.

I have an idea-ish but the experts are better to respond to this instead of me spending hours resolving it. Also, one other thing to consider, is that the same 2 controls need to be available for other records that have not been approved yet - does this make sense

Many thanks

Jason :biggrin:
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Asume you have chk1 and txt1. This code would probably do it -- in the AfterUpdate event of chk1:

Code:
If chk1 then
  txt1.Visible=True
  txt1.Value=Date()
  chk1.Enabled=False
End If
In the Form_Current event:

Code:
If chk1 then
  txt1.Visible=True
  chk1.Enabled=False
Else
  txt1.Visible=False
  chk1.Enabled=True
End If

Denis
 
Upvote 0
Hi SydneyGeek

Thanks for that

It has worked with a bit of extra coding as you cannot disable an existing edited control (ie. the check box) so I just moved to another field within the form using SETFOCUS

Thanks again

Jason
 
Upvote 0

Forum statistics

Threads
1,221,572
Messages
6,160,575
Members
451,656
Latest member
SBulinski1975

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