#  Other Applications & Softwares  > Access Tables & Databases >  >  How to lock cells

## phatus

ok I ask mr google how to lock selected cell in ms access 07 like excel do.... i only get the "How to lock the worksheet" thing...  i cant figure it out... i have my records in table1, created a form... what i want is i want to protect table1 by locking selected cell so that no one can edit it, for example field 2 protected you cant edit it, field3 unprotected you can edit it... like in excel its what you called protect sheet but u can unlock some cell you want to edit, does ms access have this kind of features too? i only know is when you open a data base it will prompt you a pw... but still can edit cells... 

hope you understand my point..  kindly help..

thanks in advance....

----------


## alansidman

You will have to use VBA to do this.  For each text box that you want to have locked, you will need to open the properties for the form, select the events tab and on the events tab, select On Load.  Your code will need to then follow the format "me.textbox.enable = false" for each of the textboxes you wish to lock.  BTW, how will you enter new data if these fields/controls (cells are in Excel) are locked.  Will that be a need or is no new data entered?

Alan

----------


## split_atom18

Or when you are in Design View you can click on the field you want to "Protect" and go to the Data Tab and change locked to yes.

Hope this helps,

Dan

----------


## phatus

if im going to edit it im going to unlock it... or is it possible a pw will prompt when your going to edit it? ill try it in the office sir thnks....

----------


## phatus

by the way sir i recall i see a access database when you open a database file it open directly to the form it self and the table where the information is saved is hidden.... how to do it sir? example when you open the database the file it self open in the form... like in power point you can save a powerpoint presentation no need to go to powerpoint program.. it open directly the presentation it self... does access have that too? it open directly in the form.. the purpose of it so the one who will open the database can only access in the form and cannot edit changes in some things.. 

hope you get what i mean sir...

very thanks for the advise...

----------


## alansidman

Look at this

http://www.databasedev.co.uk/start_up_screen.html

Alan

----------


## phatus

is it the same in access 07?

----------


## phatus

i got it i can now lock cells in forms.. now my problem is the startup... only forms should appear when you open the database...  :Frown:  the guid is 2003 can find it in 2007...

----------


## phatus

i solved it thanks for the hint

----------

