I have the need to make clients inactive, they leave us but we still need to hold the information for the authorities, so to stop them being deleted, we just make the record inactive.
Remember to make sure you have the neccessary field set in the table/form to put the date. It checks to see if a date has already been inserted, if it has, it leaves it alone which is something I think you need as well.
On the main form, I have the 'Active' tick box, and a button beside it. when I click the button, it first of all asks if the user does want to make the client inactive. It sets the 'yes/no' field to no and inserts a date in to a field.
Heres the code, there is probably a better way of doing it, but this is what I learnt and it works, so I am not going to argue.
Private Sub ClientInactive_Click()
Dim Msg, Style, Title, Help, Ctxt, Response, MyString
Msg = "Do you really want to make this client inactive? You will not be able to make this client active again!"
Style = vbYesNo + Critical + vbDefaultButton2
Title = "Inactive Client"
Ctxt = 1000
Response = MsgBox(Msg, Style, Title, Help, Ctxt)
If Response = vbYes Then ' User chose Yes.
Forms![frmclientmain]![DateUnactive] = Date
Forms![frmclientmain]![Active] = False
Else ' User chose No.
End If