Is it possible to allow/not allow editing to certain fields in a subform

  • Thread starter Thread starter jeep2001
  • Start date Start date
J

jeep2001

I have a subform which has a table as its source object. This subform
displays its data in data grid not text fields on a form. The manager I am
building this app for has requested that her users be able to only check a
yes/no field on the subform, and not have the ability to change any of the
other fields.
Is there a way to accomplish this? Thanx
 
In the properties of the fields you don't want the user to edit, changed
'LOCKED' to yes. You can also change 'TAB STOP' to no so if they tab around
it won't stop it the field.

HTH.
 
Create a form to use instead of the table. Base the form on the table. Make
its default view datasheet view. Make all the controls Locked property on
the form = Yes except for the check box. Change the source object on you
main form from the table to the new form.
 
Thank you. It sounds like the right way to go. I''ll tryit in the morning.
Ahank you
 
I have a subform which has a table as its source object. This subform
displays its data in data grid not text fields on a form. The manager I am
building this app for has requested that her users be able to only check a
yes/no field on the subform, and not have the ability to change any of the
other fields.
Is there a way to accomplish this? Thanx

Depends on how determined the users are, but yes: you can set a
control's Enabled property to No, and its Locked property to Yes, in
order that the user can only look but not touch.

This doesn't stop the user from opening the Table or a Query directly
- you'll need to implement Access security to do that.

John W. Vinson[MVP]
 
I ususally use Locked instead of Disabled for visual purposes. Disabled is
good if you want to make it apparent to the user the control is unavailable.
In any case, you don't need to use both.
 
Klatuu said:
I ususally use Locked instead of Disabled for visual purposes. Disabled is
good if you want to make it apparent to the user the control is unavailable.
In any case, you don't need to use both.

The two together do make sense in appropriate cases:

Locked - field looks normal, accepts the cursor, but can't be edited;
Disabled - field looks disabled, won't accept the cursor, and can't be
edited;
Locked /and/ Disabled - field looks normal, won't accept the cursor,
and can't be edited.

Cheers,
TC (MVP Access)
http://tc2.atspace.com
 
Thanks, TC, I'll give that a test. I have been under the impression that
anytime you use Disabled, it looked disabled. Can't remember that I have
tried the two together. This could be very useful.
 
Say you enter a ProjectID on a form, and the form replies with the
corresponding project name:

Project ID:
[123 ] ( The Big Blah Project )

Normally you would not want the project name to be editable here. So
you would set that textbox control to Locked. However, the user can
still move the cursor into that control. Then the cursor changes to a
vertical bar. So the user thinks, "WTF is going on there?".

So:
o Locked (alone) is not enough - see above;
o Disabled produces a visual effect that you would probably *not
want* here, but
o Locked + Disabled does the job nicely.

Cheers,
TC (MVP Access)
http://tc2.atspace.com
 
It worked perfectly. Thank you so much.
Create a form to use instead of the table. Base the form on the table. Make
its default view datasheet view. Make all the controls Locked property on
the form = Yes except for the check box. Change the source object on you
main form from the table to the new form.
 
Back
Top