Hi
Using Access 2003.
Have a subform with a text control called LockRecord. On double click am trying to populate the control with "yes", if the field is empty, and convserely delete the "yes" if the field has a yes value. Have placed the following code in the control's DblClick event, but it does not run.
Private Sub LockRecord_DblClick(Cancel As Integer)
If Me.LockRecord.Value = "Yes" Then Me.LockRecord.Value = "" Else If Me.LockRecord.Value = "" Then Me.LockRecord.Value = "Yes"
DoCmd.Requery
End Sub
It runs fine if I just have Me.LockRecord.Value = "Yes", but the conditional statement does not run. What am I doing wrong?
Thanks
Using Access 2003.
Have a subform with a text control called LockRecord. On double click am trying to populate the control with "yes", if the field is empty, and convserely delete the "yes" if the field has a yes value. Have placed the following code in the control's DblClick event, but it does not run.
Private Sub LockRecord_DblClick(Cancel As Integer)
If Me.LockRecord.Value = "Yes" Then Me.LockRecord.Value = "" Else If Me.LockRecord.Value = "" Then Me.LockRecord.Value = "Yes"
DoCmd.Requery
End Sub
It runs fine if I just have Me.LockRecord.Value = "Yes", but the conditional statement does not run. What am I doing wrong?
Thanks