Thanks. It works.
But I just wonder why "AllowEdits" alone can't do the job.
"Linq Adams via AccessMonster.com" wrote:
[Quoted Text] > Actually, adding a single line > > If Me.Dirty Then Me.Dirty = False > > > to your current code should do it: > > Private Sub lblEdit_Click() > > If Me.lblEdit.Caption = "Edit" Then > Me.AllowEdits = True > Me.lblEdit.Caption = "Disable Edit" > Else > If Me.lblEdit.Caption = "Disable Edit" Then > If Me.Dirty Then Me.Dirty = False > Me.AllowEdits = False > Me.lblEdit.Caption = "Edit" > End If > End If > End Sub > > -- > There's ALWAYS more than one way to skin a cat! > > Answers/posts based on Access 2000/2003 > > Message posted via AccessMonster.com > http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200811/1> >
|