Greetings,
I need to get an actual count of real alph-numeric characters in a TEXT field. The field I'm checking is called DOCNO, and holds a Document Number. The size of this field is 14, and it is a TEXT-type field.
1. Here is an example of a valid DOCNO with 14 actual alpha-numeric characters: GRE21841324030
2. Here is an example of an invalid DOCNO without 14 actual characters: ABO8835 0
In example 2, there are eight actual alpha-numeric characters in the field. In a query I created a field called Char, and placed the following in the grid: Char: Len([DOCNO])
This returns 14. I had hoped that it would only count the "real" alpha-numeric characters. It also seems to count spaces. When I count the actual "spaces" taken by the example in "2" above, the result is 14.
Is there some way to only count letters and numbers in a text field? I want to alert the user if there are less than 14 "real" alpha-numeric characters in this field. Then they can research and correct the problem.
I had thought of posting this in the QUERY forum, but thought that anything that worked in a form may work in a query. I would rather use a solution in the QUERY, rather than the FORM.
Thanks for any assistance.
Bob in Indy -- currently at work.
I need to get an actual count of real alph-numeric characters in a TEXT field. The field I'm checking is called DOCNO, and holds a Document Number. The size of this field is 14, and it is a TEXT-type field.
1. Here is an example of a valid DOCNO with 14 actual alpha-numeric characters: GRE21841324030
2. Here is an example of an invalid DOCNO without 14 actual characters: ABO8835 0
In example 2, there are eight actual alpha-numeric characters in the field. In a query I created a field called Char, and placed the following in the grid: Char: Len([DOCNO])
This returns 14. I had hoped that it would only count the "real" alpha-numeric characters. It also seems to count spaces. When I count the actual "spaces" taken by the example in "2" above, the result is 14.
Is there some way to only count letters and numbers in a text field? I want to alert the user if there are less than 14 "real" alpha-numeric characters in this field. Then they can research and correct the problem.
I had thought of posting this in the QUERY forum, but thought that anything that worked in a form may work in a query. I would rather use a solution in the QUERY, rather than the FORM.
Thanks for any assistance.
Bob in Indy -- currently at work.