C
chris1 via AccessMonster.com
I have a subform with an "On Exit" Event. I would like for the exit event to
inform the user of an incorrect input and have the textbox change color.
However the field with all the records change color. I have tried looking
around but I am looking for some type of VBA code that could solve that. Here
is my On Exit VBA Code
Private Sub FieldName_Exit(Cancel as Integer)
If Me.[FieldName] < sngSomeAmount and Me.[AnotherFieldname] =
"txtCriteria" then
Me.[FieldName].BorderColor = RGB(255,0,0)
Me.[FieldName].SetFocus
Else
Me.[FieldName].BorderColor = RGB(0,0,0)
Endif
Is there some code or the appropriate expression in the Conditional
Formatting section that will only work on the field in the current record.
Thank you!
inform the user of an incorrect input and have the textbox change color.
However the field with all the records change color. I have tried looking
around but I am looking for some type of VBA code that could solve that. Here
is my On Exit VBA Code
Private Sub FieldName_Exit(Cancel as Integer)
If Me.[FieldName] < sngSomeAmount and Me.[AnotherFieldname] =
"txtCriteria" then
Me.[FieldName].BorderColor = RGB(255,0,0)
Me.[FieldName].SetFocus
Else
Me.[FieldName].BorderColor = RGB(0,0,0)
Endif
Is there some code or the appropriate expression in the Conditional
Formatting section that will only work on the field in the current record.
Thank you!