All,
I have a form with a combo box field, named: softcopy_hardcopy. I have the following values associated with that combo box field: Cancelled, Both, Hardcopy, Need Hardcopy, Need Softcopy, & Softcopy. I would like the Cancelled to change to red font and bold when selected, but the others would remain black.
The problem I have is when I choose Cancelled with the following code, it turns all of the records for that field red, no matter if it's Cancelled or not. I also have additional code for the "N/A" value, but I'm not concerned with that, because that is working ok. I tried some Else statements as well, but they did not work either. Here is the code I'm using:
Private Sub softcopy_hardcopy_AfterUpdate()
If softcopy_hardcopy = "Cancelled" Then
location_softcopy = "N/A"
location_hardcopy = "N/A"
End If
If softcopy_hardcopy = "Both" Then
softcopy_hardcopy.ForeColor = 0
End If
If softcopy_hardcopy = "Hardcopy" Then
softcopy_hardcopy.ForeColor = 0
End If
If softcopy_hardcopy = "Need Hardcopy" Then
softcopy_hardcopy.ForeColor = 0
End If
If softcopy_hardcopy = "Need Softcopy" Then
softcopy_hardcopy.ForeColor = 0
End If
If softcopy_hardcopy = "Softcopy" Then
softcopy_hardcopy.ForeColor = 0
End If
End Sub
Can someone please let me know what I am doing wrong?
It would surely be appreciated.
Thanks,
Jerome Benton
JERPAT Web Designs
GOD Is Good All The Time!!!
I have a form with a combo box field, named: softcopy_hardcopy. I have the following values associated with that combo box field: Cancelled, Both, Hardcopy, Need Hardcopy, Need Softcopy, & Softcopy. I would like the Cancelled to change to red font and bold when selected, but the others would remain black.
The problem I have is when I choose Cancelled with the following code, it turns all of the records for that field red, no matter if it's Cancelled or not. I also have additional code for the "N/A" value, but I'm not concerned with that, because that is working ok. I tried some Else statements as well, but they did not work either. Here is the code I'm using:
Private Sub softcopy_hardcopy_AfterUpdate()
If softcopy_hardcopy = "Cancelled" Then
location_softcopy = "N/A"
location_hardcopy = "N/A"
End If
If softcopy_hardcopy = "Both" Then
softcopy_hardcopy.ForeColor = 0
End If
If softcopy_hardcopy = "Hardcopy" Then
softcopy_hardcopy.ForeColor = 0
End If
If softcopy_hardcopy = "Need Hardcopy" Then
softcopy_hardcopy.ForeColor = 0
End If
If softcopy_hardcopy = "Need Softcopy" Then
softcopy_hardcopy.ForeColor = 0
End If
If softcopy_hardcopy = "Softcopy" Then
softcopy_hardcopy.ForeColor = 0
End If
End Sub
Can someone please let me know what I am doing wrong?
It would surely be appreciated.
Thanks,
Jerome Benton
JERPAT Web Designs
GOD Is Good All The Time!!!