Hello All,
I have a subform with a field that counts the number of agents off per team. I want to create a peice of vb code where If the department contains the letters "one" And the count is more than 1 to highlight the text box.
I have the following written;
Private Sub CountOfpayroll_number_AfterUpdate()
If [CountOfpayroll_number] >1 And SectionManager.Value = Then
CountOfpayroll_number.ForeColor = vbRed
CountOfpayroll_number.FontWeight = 700
Else
CountOfpayroll_number.ForeColor = vbBlack
CountOfpayroll_number.FontWeight = 400
End If
End Sub
The above is wrong as Im sure I need to declare a string but confused on how to.
Thanks for your help
Mos
________
Extreme vaporizer q review
I have a subform with a field that counts the number of agents off per team. I want to create a peice of vb code where If the department contains the letters "one" And the count is more than 1 to highlight the text box.
I have the following written;
Private Sub CountOfpayroll_number_AfterUpdate()
If [CountOfpayroll_number] >1 And SectionManager.Value = Then
CountOfpayroll_number.ForeColor = vbRed
CountOfpayroll_number.FontWeight = 700
Else
CountOfpayroll_number.ForeColor = vbBlack
CountOfpayroll_number.FontWeight = 400
End If
End Sub
The above is wrong as Im sure I need to declare a string but confused on how to.
Thanks for your help
Mos
________
Extreme vaporizer q review
Last edited: