Counting Digits

  • Thread starter Thread starter Tony
  • Start date Start date
T

Tony

Good Morning,

Is there a way to count the number of digits within a
field in a query? Example: We have a field call PN (Part
Number) and the Part Number could be of 6 to 8 digits
long. Would like a an expression/calculated field that
would count the values. Any insite would be appreciated.

-T
 
Good Morning,

Is there a way to count the number of digits within a
field in a query? Example: We have a field call PN (Part
Number) and the Part Number could be of 6 to 8 digits
long. Would like a an expression/calculated field that
would count the values. Any insite would be appreciated.

-T

Len([PN])
will return the total number of characters in the field.
Len(5632) = 4

If you mean to count only the numbers in a field that also includes
letters ("AXH82897") , you'll need to write your own user defined
function.
Post back if you need help in doing that.
 
Thanks Fred!


-----Original Message-----
Good Morning,

Is there a way to count the number of digits within a
field in a query? Example: We have a field call PN (Part
Number) and the Part Number could be of 6 to 8 digits
long. Would like a an expression/calculated field that
would count the values. Any insite would be appreciated.

-T

Len([PN])
will return the total number of characters in the field.
Len(5632) = 4

If you mean to count only the numbers in a field that also includes
letters ("AXH82897") , you'll need to write your own user defined
function.
Post back if you need help in doing that.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
 
InStr("how are you / where are you", "/") or, to be more complete, InStr(1,
"how are you / where are you", "/", vbTextCompare)
 
Back
Top