Unlock datasheet from from

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
 
A

Arvin Meyer MVP

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top