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

Reset One Value On Save Cmd Button 1

Status
Not open for further replies.

smdemo

Programmer
Sep 15, 2002
63
US
I hope I can be clear with what I am looking for. I have a database that has a status field with values such as Open, Pending, Closed. When a case is set to closed it is archived. I need some validation to happen at that point to make sure one or more fields are completed (the record is not completed all at once so I can't just set the field to required). What I need to happen is if they set the status to close and click the button to save the record I want the field to revert back to the previous status (open or pending), but save the rest of the information in the record. I have pasted what I have but obviously need to adjust the Me.TaskStatus.Value = "O" line and am not sure how to call back the previous value.

Thanks
Steve


If strDC = "Not Valid" Then
strDateComp = "Date completed is not valid."
MsgBox "Please note that this call is not complete because:" & Chr(13) & Chr(13) & strDateComp, vbInformation
If Me.TaskStatus.Value = "C" Then
Me.TaskStatus.Value = "O"
End If
End If
 
What about this ?
Me.TaskStatus.Value = Me.TaskStatus.OldValue

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Works perfectly. I can't believe I scrolled right by that when looking at the properties list.

Thanks
Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top