Professional Web Applications Themes

How to Count the Characters of a Field? - Microsoft Access

I want to discover how many times the bar (/) appears inside of the field numnota how do I do?...

Sponsored Links
  1. #1

    Default How to Count the Characters of a Field?




    I want to discover how many times the bar (/) appears inside of the field
    numnota

    how do I do?


    Sponsored Links
    Frank Dulk Guest

  2. #2

    Default Re: How to Count the Characters of a Field?

    As I make this function?

    "msmcnewsxp" <mcourtermindspring.com> escreveu na mensagem
    news:O6Fr8OvSDHA.1868TK2MSFTNGP11.phx.gbl...
    > you could write a vba routine using a for loop to len of field value and
    > count using instr(myfield,"'") > 0.
    >
    >
    > "Frank Dulk" <fdulkbol.com.br> wrote in message
    > news:uX1tEGvSDHA.212TK2MSFTNGP10.phx.gbl...
    > >
    > >
    > >
    > > I want to discover how many times the bar (/) appears inside of the
    field
    > > numnota
    > >
    > > how do I do?
    > >
    > >
    >
    >

    Frank Dulk Guest

  3. #3

    Default Re: How to Count the Characters of a Field?

    You have to use the Instr function and loop through the string.




    "Frank Dulk" <fdulkbol.com.br> wrote in message
    news:uX1tEGvSDHA.212TK2MSFTNGP10.phx.gbl...
    >
    >
    >
    > I want to discover how many times the bar (/) appears inside of the field
    > numnota
    >
    > how do I do?
    >
    >

    Mike Painter Guest

  4. #4

    Default Re: How to Count the Characters of a Field?

    pick an event for the control like lostfocus

    dim x as integer
    dim y as integer

    for x = 1 to len(numnota.value)
    if instr(mid(numnota.value,x,1),"/") > 0 then y = y + 1
    next x


    msmcnewsxp Guest

  5. #5

    Default Re: How to Count the Characters of a Field?

    Here's a quick and doubtless inefficient method, but it's a cute
    one-liner:

    lngCount = UBound(Split([numntota] & " ","/",,vbBinaryCompare))

    --
    Dirk Goldgar, MS Access MVP
    [url]www.datagnostics.com[/url]

    (please reply to the newsgroup)

    "Mike Painter" <mpainteratattdotnet> wrote in message
    news:c9e7a1748dfb203c8b2bd7289b0d75ecfree.teranew s.com
    > You have to use the Instr function and loop through the string.
    >
    >
    >
    >
    > "Frank Dulk" <fdulkbol.com.br> wrote in message
    > news:uX1tEGvSDHA.212TK2MSFTNGP10.phx.gbl...
    >>
    >>
    >>
    >> I want to discover how many times the bar (/) appears inside of the
    >> field numnota
    >>
    >> how do I do?

    Dirk Goldgar Guest

Similar Threads

  1. incrementing field count. help please!!
    By Joe Science in forum Macromedia ColdFusion
    Replies: 0
    Last Post: April 18th, 11:57 PM
  2. Removing characters out of a field
    By julball in forum Coldfusion - Advanced Techniques
    Replies: 1
    Last Post: March 24th, 10:14 PM
  3. Count characters in Freehand
    By Ann in forum Macromedia Freehand
    Replies: 4
    Last Post: December 30th, 04:17 PM
  4. How can I count field entries?
    By Fred in forum FileMaker
    Replies: 2
    Last Post: September 9th, 09:25 PM
  5. How do I count blocks of characters in a string variable?
    By Researcher in forum PERL Miscellaneous
    Replies: 5
    Last Post: September 8th, 12:53 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139