Hi everyone
I am not very good with code and any help would be greatly appreciated.
I am trying to achieve the following.
I have a series of fields in a form. Each has figures in them. I have summed the fields into one field. When all of the fields are reduced to 0 I want it to look at the total field and tell me that this field = 0 and to prompt me with a message box that there are no hours left in this job. I then check the ok button and the completed check box on the main form to demonstrate that the job is complete. This is the code I have entered, but it is not working. It is not returning any error messages, but is not doing what I want it to do either.
Private Sub Total_Hours_Change()
If [Total Hours] < 0.0001 Then
MsgBox "There are no hours left to complete"
End Sub
Further to this, in an ideal world I would like the message box that prompts me about the jobs completion to have a yes to confirm and a no to deny completion button. If the yes button is clicked then the completed check box is automatically checked on the main form. If no is clicked then the form is left as is.
Any thoughts would be really appreciated. It is probably a simple task, but as I said I am hopeless with code.
Kind Regards
Jodi
I am not very good with code and any help would be greatly appreciated.
I am trying to achieve the following.
I have a series of fields in a form. Each has figures in them. I have summed the fields into one field. When all of the fields are reduced to 0 I want it to look at the total field and tell me that this field = 0 and to prompt me with a message box that there are no hours left in this job. I then check the ok button and the completed check box on the main form to demonstrate that the job is complete. This is the code I have entered, but it is not working. It is not returning any error messages, but is not doing what I want it to do either.
Private Sub Total_Hours_Change()
If [Total Hours] < 0.0001 Then
MsgBox "There are no hours left to complete"
End Sub
Further to this, in an ideal world I would like the message box that prompts me about the jobs completion to have a yes to confirm and a no to deny completion button. If the yes button is clicked then the completed check box is automatically checked on the main form. If no is clicked then the form is left as is.
Any thoughts would be really appreciated. It is probably a simple task, but as I said I am hopeless with code.
Kind Regards
Jodi