Hi Bob,
Try this: Go into the design view of your table. Right-click and
choose Properties Add this to the table's Validation Rule property:
Len([Client/Address])-Len(Replace([Client/Address],Chr$(13) & Chr$(10),""))<=8
And something like this to the Validation Text:
Please enter no more than five lines in the Client/Address field.
Alternatively, you might set these values in the text box's Validation
Rule and Validation Text properties. Or you might use an After Update event
on the text box to do the checking. My preference would be to put it in the
table so that it gets enforced regardless of how the data gets into the table
(imports, forms, direct entry, SQL statements in code, etc.).
By the by, if your field name really does contain a slash, I suggest
you change it so as to avoid potential problems that might arise should you
or someone else forget to enclose the name in brackets; which would cause
Access to try to divide Client by Address.
Hope that helps,
Clifford Bass