G
Guest
I have a form which has a check box that will replace a comment in a field
called STATUS in my table. Before my form is opened, the STATUS field already
has a comment in it. What I am having problem with, is to restore the
original STATUS comment if the event the user choose to uncheck the check box
from the form before it close it (one is close I don't care about undo).
me.undo does the job however it undo every change to the form. I have tried
Me!Status.undo
me.status.undo and
Me!Satatus.oldvalue
Dim OriginalValue As String
OriginalValue = Me!Status
me.Status.oldvalue
Me!Status = OriginalValue
and nottthing seems to work. I am getting very frustrated Can anyone help?
The code I have is a follow:
Private Sub ynFromZone_Click()
Dim OriginalValue As String
OriginalValue = Me!Status
If Me!ynFromZone = True Then
Me!tFromZone = Now
Me!dFromZone = Date
Me!Status = "Pending Assignment since " & Date
Me.Refresh
Else
Me!Status = OriginalValue
Me!ynFromZone = False
Me!tFromZone = Null
Me!dFromZone = Null
Me.Refresh
End If
End Sub
called STATUS in my table. Before my form is opened, the STATUS field already
has a comment in it. What I am having problem with, is to restore the
original STATUS comment if the event the user choose to uncheck the check box
from the form before it close it (one is close I don't care about undo).
me.undo does the job however it undo every change to the form. I have tried
Me!Status.undo
me.status.undo and
Me!Satatus.oldvalue
Dim OriginalValue As String
OriginalValue = Me!Status
me.Status.oldvalue
Me!Status = OriginalValue
and nottthing seems to work. I am getting very frustrated Can anyone help?
The code I have is a follow:
Private Sub ynFromZone_Click()
Dim OriginalValue As String
OriginalValue = Me!Status
If Me!ynFromZone = True Then
Me!tFromZone = Now
Me!dFromZone = Date
Me!Status = "Pending Assignment since " & Date
Me.Refresh
Else
Me!Status = OriginalValue
Me!ynFromZone = False
Me!tFromZone = Null
Me!dFromZone = Null
Me.Refresh
End If
End Sub