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!

Discarding changes 1

Status
Not open for further replies.

HIM

Programmer
May 8, 2000
50
GB
I am currently building an application in Access 2000. A system to handle canoepolo turnaments. When I during run time, finishes a match, I would like to close the match data for editing, but leave all the rest of the matches open. I therefore put a yes/no field on the match record. I would then like to check on this field whenever somebody attempts to edit data relating to this record. I need to know what event to add the code to, and I would like to know how to discard changes in VBA code.
 
in the forms before insert event<br>=IIf([yes/no]=no,[AllowEdits]=no,[AllowEdits]=yes)<br>will make it so they cant edit it on the form
 
ignore the above this works<br><br>Private Sub Form_Current()<br>If Me.yes_no = 0 Then<br>Me.AllowAdditions = False<br>Me.AllowDeletions = False<br>Me.AllowEdits = False<br>Else<br>Me.AllowAdditions = True<br>Me.AllowDeletions = True<br>Me.AllowEdits = True<br>End If<br>be sure the yes/no has a default of -1 <br><br>End Sub
 
Hmmmmm. The problem is, that there is still records left in the form that should not be locked. It is only those records that has a yes/no filed checked, that should be locked.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top