Query showing vbCRLF in string data

25 pts.
Tags:
Access Database
Microsoft Access
Microsoft Access 2003
SQL Query
Can someone provide SQL code that would generate a table showing any instance where a vbCRLF character can be found anywhere in my table? IOW, I'm trying to list records where the user input 2 or more lines of data in a simple text field. E.g., "John Q. vbCRLFSmith" as opposed to just "John Q. Smith"

Answer Wiki

Thanks. We'll let you know when a new response is added.

Here is an example of how to detect LINEFEEDs in your data:

SELECT [Property owners].OWNER_NAME, [Property owners].OWNER_NAM2, [Property owners].OWNER_ADDR, [Property owners].OWNER_ADD2, [Property owners].TAXMAP_PARCEL, [Property owners].DEEDBOOK

FROM [Property owners]

WHERE (

(

InStr([Property owners].[OWNER_NAME],Chr$(10)) > 0

)

OR

(

InStr([Property owners].[OWNER_NAM2],Chr$(10)) > 0

)

OR

(

InStr([Property owners].[OWNER_ADDR],Chr$(10)) > 0

)

OR

(

InStr([Property owners].[OWNER_ADD2],Chr$(10)) > 0

)

OR

(

InStr([Property owners].[TAXMAP_PARCEL],Chr$(10)) > 0

)

OR

(

InStr([Property owners].[DEEDBOOK],Chr$(10))

)

);

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Chippy088
    Did sandisk's answer work? I'd be suprised if it did, lf and crlf are 2 diferent characters. Chr$(13) is the crlf you are looking for. Chr$(10) is just a simple lf (line feed) just for info the terms line feed and carriage return come from the old teletype/telegram machine a cr (carriage return) told the print head to return to the beginning of the line, where it would over write the old characters with the new, unless the lf (line feed) which told the carriage to rotate to feed the paper up 1 line(or what ever the spacing was set to) was given imediately after the cr command. So, personally i'd use the instr$ function to look for the crlf chr$(13) and replace it with chr$(32) which is a space, or just remove it from the string. Dave
    4,625 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following