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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trouble with allowdeletions,addtions and edits

Status
Not open for further replies.

ind

Programmer
Mar 9, 2000
121
US
I'm should this question has been asked before but here it goes anyway.<br><br>I have a option group w/ Yes or No options. When the option Yes is checked I want allowdeletions, allowaddtions and allowedits for the form set to false.<br>When the option No is checked I want allowdeletions, allowaddtions and allowedits for the form set to true.<br><br>How can I do this correctly?????<br><br>Thanks for all your help.
 
in the after update property of the option group put:<br><b><br>If {OptionGroupName] = -1 Then<br>Me.Form.AllowAdditions = False<br>Me.Form.AllowEdits = False<br>Me.Form.AllowDeletions = False<br>Else<br>Me.Form.AllowAdditions = True<br>Me.Form.AllowEdits = True<br>Me.Form.AllowDeletions = True<br>End if<br></b><br><br>just put you option groups name in the the brackets.<br> <p>Brian Famous<br><a href=mailto:bfamous@ncdoi.net>bfamous@ncdoi.net</a><br><a href= > </a><br>
 
Ok.<br><br>I've got the code right and the Delete record and Add New record buttons are disabled when the value = -1 and enabled when the value = 0.<br><br>But I can still make changes to the records.<br><br>What's up?????????
 
even though you can change the records on the screen, does the data in the underlying table change?<br><br>if so, you may just want to put <br><br>Me.FieldName.locked = true<br><br>in the after update property for each field. this will prevent any changes from occuring <p>Brian Famous<br><a href=mailto:bfamous@ncdoi.net>bfamous@ncdoi.net</a><br><a href= > </a><br>
 
Is there anyway to locked all the controls with a few lines of code?<br>I have SEVERAL controls on this form
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top