Unlock datasheet from from

  • Thread starter Thread starter CAM
  • Start date Start date
C

CAM

Hello,

I am using MS Access 2002 and I have a form that has tab control the first
page has a form view and the second page has the datasheet view. I locked
the text boxes in the form view and have a edit button to unlock all the
text boxes in the form. I want have the datasheet lock, which is no problem,
but I want to unlock it by pressing the edit button during run time. How do
I do this? Now the datasheet is call "sfrmDatasheet" Any tips will be
appreciated. Thank you in advance.

Cheers
 
You would use the Allow edits property, and turn it off in the form's
Current event:

Sub Form_Current()
Me.AllowEdits = False
End Sub

and the edit button would yutn iy on:

Sub cmdEdit_Click()
Me.AllowEdits = True
End Sub
 
Back
Top