PDA

View Full Version : Solved: locking a cell after it has been modified



hatched850
03-17-2006, 11:28 AM
Can some one help me with this delima? :banghead: I have a date field that when clicked will add in the date and time. I want it to lock after that so that the date and time can not be changed any suggestions. I just have on click to set to enter now(). I also want the same thing to happen in another date field but it is a little trickier I have 2 fields approved and dissapproved and if either one is checked it puts the date and time in a field when checked. I want the date and time field to lock on the date field after selection is made. I hope you understand what I am trying to say.

Deb

mdmackillop
03-17-2006, 12:48 PM
Hi Deb
Are you looking to
1. protect the worksheet with these cells locked to prevent any possible changes
2. prevent the button or other event from being run again, but would still permit overtyping of the data in these cells
Regards
MD

hatched850
03-17-2006, 01:11 PM
Protect the Cells from Data being Changed not the Sheet. I don't want the Data Changed in the particular Cell I have attached a word doc with picture of the Data Sheet. This is a subform There are two of these in my main form one for Technical Approval and one for content approval. Does that help?

mdmackillop
03-17-2006, 01:19 PM
Hi Deb,
It would help more if I read the subject properly. :censored: I was thinking this was an Excel problem, not Access.
I'm not sure I can help, but I'm sure one of our Access experts can.
Regards
MD

hatched850
03-17-2006, 01:21 PM
Thanks anyway LOL

JMG
03-22-2006, 07:29 AM
try this on close property of the form:

If isnull (mydatefield) then
mydatefield.enabled = true
else
mydatefield.enabled = false
endif