How to find "ENTER's¸- NEW LINE" in the Field (1 Viewer)

Moocka

New member
Local time
Today, 20:52
Joined
Mar 22, 2009
Messages
3
Hi.

I am a begginer with Access and I am trying to find a way how to idetify rows which cointain more than 1(2,3) Enter's (new lines).

Please help, it is pretty urgent
 

HiTechCoach

Well-known member
Local time
Today, 13:52
Joined
Mar 6, 2006
Messages
4,357
I am not really sure what you want.

First thought may be that you are looking fior duplicates. If yes, then try using the Duplicate query wizard.

If you want counts, then try a totaling query.

If these do not help, you will need to explain in a lot more detail exactly what you want to do.
 

Moocka

New member
Local time
Today, 20:52
Joined
Mar 22, 2009
Messages
3
Hi.

Example:

My field in the row is like:
----------------------
aaaaa
bbbbb
----------------------

This fiel contains 1 Enter after the "aaaaa".

Now I would like to find all fields who are like:
----------------------
aaaaa
bbbbb

----------------------

So this Field has 2 Enters: after aaaaa and after bbbbb.

Does it make sense ?
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 19:52
Joined
Sep 12, 2006
Messages
15,651
you mean carriage return, or linefeed (cr, or lf) , (rather thna Enter) and there will (should) only be one cr in the example rows, as you wouldnt get one at the end of the second row (or at the end of a single row with no continuation)

now cr is chr(13) or also vbcr, and lf is chr(10) or also vblf

you may be able to have a query with a criteria

like "*" & chr(13) & "*"

that might help

i dont think you can use the expression vbcr directly in a query, so
like "*" vbcr & "*" - will probably not work
 

Moocka

New member
Local time
Today, 20:52
Joined
Mar 22, 2009
Messages
3
Hi.

Thank you. I does work!
What would be the sentence to find more than "X" ENTERS in the row ?

I appreciate..
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 19:52
Joined
Sep 12, 2006
Messages
15,651
you wouldnt be able to have a single query that would find instances of more than 1 CR in a single string.

you would need to use a function to scan the field, and return true if there were more than 1 CR
 

Rabbie

Super Moderator
Local time
Today, 19:52
Joined
Jul 10, 2007
Messages
5,906
You could write a function that examines the ffield context character by character and returns a count of the lf characters found.
 

Users who are viewing this thread

Top Bottom