Solved Conditional formatting on cell in continuous form when vbCrLf found (1 Viewer)

Local time
Today, 06:42
Joined
Apr 28, 2022
Messages
39
I'm trying to conditionally format a long text field in a continuous form. The form only shows the first line of text so I want to highlight the field if it consists of more than one line i.e. if it contains a vbCrLf. In code I can do this easily enough on a normal form for one record with UBound(Split([txtNotes], vbCrLf))>0 but I can't get it to work when I use it as an expression using conditional formatting. I can get [txtNotes]>"" to work on any cells that aren't blank so close but no cigar. Any ideas?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 13:42
Joined
May 7, 2009
Messages
19,231
use the Expression:

Instr(1, [txtNotes] & "", Chr(13)) <> 0
 

Users who are viewing this thread

Top Bottom