I have a combo box that keeps track of the status of my jobs. The different options are:
1. New
2. In Progress
3. Completed
When I create a job, the default value is New. What I'm wanting is make it so that once the status has been changed to In Progress or Completed, the ability to change the status back to new is removed. I've gotten as far as to figure out that I need to do this in the Before_Update event of the combo box, but I can't figure out how to test the old value to see if it was greater than 1 (meaning it had a status of either In Progress or Completed) and if the new value is 1 (New) in which case I would cancel the update with a message explaining why the status couldn't be changed to New.
Part of my problem is that I'm not sure what the value of Me.JobStatus (the name of the combo box) is in the Before_Update event. For example, if the status is 2 - In Progress and the user attempts to change it to 3 - Completed, what is the value of Me.JobStatus before the update; 2 or 3? I hope that makes sense.
1. New
2. In Progress
3. Completed
When I create a job, the default value is New. What I'm wanting is make it so that once the status has been changed to In Progress or Completed, the ability to change the status back to new is removed. I've gotten as far as to figure out that I need to do this in the Before_Update event of the combo box, but I can't figure out how to test the old value to see if it was greater than 1 (meaning it had a status of either In Progress or Completed) and if the new value is 1 (New) in which case I would cancel the update with a message explaining why the status couldn't be changed to New.
Part of my problem is that I'm not sure what the value of Me.JobStatus (the name of the combo box) is in the Before_Update event. For example, if the status is 2 - In Progress and the user attempts to change it to 3 - Completed, what is the value of Me.JobStatus before the update; 2 or 3? I hope that makes sense.
Comment