How to make a subform "read only"

D

DontKnow

Hi Guys,

How would I make a subform readonly so that I am able to look at the
controls within a subform but simply not able to update/change them on a
datasheet view?

many thnaks for your help?

Cheers
 
A

Allen Browne

Open the subform in design view.

Set its Allow Edits property to No.

Alternatively, set the Locked property of the text boxes to Yes.
 
R

ryguy7272

Ok, look closely at the Data properties section (this is where you make
changes). There will be two properties on those fields (allow deletions) &
(allow additions). Change their properties to NO; this should stop users
from adding and deleting records.

Ryan---
 
J

John Spencer

Just set the subform control's locked property to Yes (True). That should
prevent all changes on the subform. You might want to make sure the subform
control has its enabled property set to true.

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
 
D

DontKnow

tHanks guys for that input!!

I was wondering how the best way to do this using VBA ?
 
D

Daryl S

DontKnow -

If you are in the main form, do this (substitue your subform name):

Me.subformName.Enabled = True
Me.subformName.Form.AllowEdits = False
 

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