Find records with a line break using a query

Terpsichore

Registered User.
Local time
Yesterday, 23:28
Joined
Jun 5, 2006
Messages
34
Hello all,

I want to create a query that looks for a manual line break in a memo field. Is there a code or some way that I can do this? (i.e in a Memo field the user has entered some data, hit Ctrl-enter to get to a new line, entered more data on the new line. I want to find the records where this has occured)

Also, on a similar note, is there a way I can deny my users the option of doing a manual break (Ctrl-Enter) in a Control in a Form? (to prevent me needing to run this query in the future)

Please advise.

tia,
Angel
 
Hello all,

I want to create a query that looks for a manual line break in a memo field. Is there a code or some way that I can do this? (i.e in a Memo field the user has entered some data, hit Ctrl-enter to get to a new line, entered more data on the new line. I want to find the records where this has occured)

Also, on a similar note, is there a way I can deny my users the option of doing a manual break (Ctrl-Enter) in a Control in a Form? (to prevent me needing to run this query in the future)

Please advise.

tia,
Angel

To prevent this, on the before_update event of the form check for chr(10) and if it is present either remove it in code or prompt the user to remove it.

to search for it in records you could create a new field in a query that you could filter on.

Code:
SELECT YourTable.*, IIf(InStr(1,[YourMemoField],Chr(10))<>0,True,False) AS NewField FROM YourTable
WHERE (((IIf(InStr(1,[YourMemoField],Chr(10))<>0,True,False))=True));
 
Worked like a charm

Thanks! Worked perfectly!
 

Users who are viewing this thread

Back
Top Bottom