Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Help Providing a Read-Only Form for Users 2

Status
Not open for further replies.

jt643

Technical User
Jun 17, 2003
144
I have a button on a form that will open another form to allow users to edit a record. That original form also has a check box to tell the user that the customers have 'signed off' on a certain item.

What I want to happen:

When the user clicks the button to open the next form, the code looks at the table that houses the check box information. If the check box has been checked (=True), then I want the code to essentially show all the records on the form but cause them all to be 'locked' so that no one can actually edit them.

I have done this on other forms in my database by creating an entire second 'Read-Only' form and locking all of those records. However, this particular form is rather large and has some complex code (for me at least) telling the form what objects can be visible based on the control source.

Any help would be GREATLY appreciated!
 
One way to do it is to set the "Allow Edits" and "Allow Deletions", and "Allow Additions" properties of the form to False.
 
Thanks FancyPrairie.

I know how to that in the actual Form properties in Design View, but is it possible to set those properties within Visual Basic?

If I set them in the Design View of the form, then I assume I would need to create two forms as I suggested above. However, I would like to manage this in the code if it is at all possible.
 
In VBA the properties are:
Me.AllowAdditions, Me.AllowDeletions and Me.AllowEdits

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks PHV.

Will Me.AllowAdditions, et al control the property of the entire form?

Or do I need some other code to tell it that needs to apply this to the entire form?
 
I used PHV's suggestion, and it worked great!

Thanks to both of you for your suggestions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top